Commit 8969ebda67bb578a547d07bdd1a6eec3ccdcfa86
0 parents
Init commit.
Showing
53 changed files
with
4832 additions
and
0 deletions
Too many changes to show.
To preserve performance only 53 of 274 files are displayed.
.gitignore
0 → 100644
Gruntfile.js
0 → 100644
1 | +++ a/Gruntfile.js | |
1 | +module.exports = function( grunt ){ | |
2 | + grunt.initConfig({ | |
3 | + //initconfig start | |
4 | + | |
5 | + /* | |
6 | + * Read the package json. | |
7 | + */ | |
8 | + pkg: grunt.file.readJSON( 'package.json' ), | |
9 | + | |
10 | + /* | |
11 | + * Clean the directory in {src}. | |
12 | + */ | |
13 | + clean: { | |
14 | + build: { | |
15 | + src: [ '<%= pkg.name %>/<%= pkg.version %>*' ] | |
16 | + } | |
17 | + }, | |
18 | + | |
19 | + /* | |
20 | + * Minify css file. | |
21 | + */ | |
22 | + cssmin: { | |
23 | + options: { | |
24 | + /* | |
25 | + * Set the date target. | |
26 | + * Close the advanced feature, | |
27 | + * make the css hack work like *{ *width: auto } | |
28 | + */ | |
29 | + banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n', | |
30 | + noAdvanced: true, | |
31 | + compatibility: 'ie8' | |
32 | + }, | |
33 | + compress: { | |
34 | + files: [{ | |
35 | + expand: true, | |
36 | + cwd: 'css', | |
37 | + src: [ '*.css' ], | |
38 | + dest: '<%= pkg.name %>/<%= pkg.version %>/css', | |
39 | + ext: '.css' | |
40 | + }] | |
41 | + } | |
42 | + }, | |
43 | + | |
44 | + /* | |
45 | + * Minify js file. | |
46 | + */ | |
47 | + uglify: { | |
48 | + compress: { | |
49 | + options: { | |
50 | + mangle: false, | |
51 | + maxLinelen: 80 | |
52 | + }, | |
53 | + files: [{ | |
54 | + expand: true, | |
55 | + cwd: 'js', | |
56 | + src: '**/*.js', | |
57 | + dest: '<%= pkg.name %>/<%= pkg.version %>/js' | |
58 | + }] | |
59 | + } | |
60 | + }, | |
61 | + | |
62 | + /* | |
63 | + * Minify image file. | |
64 | + */ | |
65 | + imagemin: { | |
66 | + compress: { | |
67 | + files: [{ | |
68 | + expand: true, | |
69 | + cwd: 'images/', | |
70 | + src: ['**/*.{png,jpg,gif}'], | |
71 | + dest: '<%= pkg.name %>/<%= pkg.version %>/images' | |
72 | + }] | |
73 | + } | |
74 | + }, | |
75 | + | |
76 | + /* | |
77 | + * Listen the file change and run task. | |
78 | + watch: { | |
79 | + stylesheets: { | |
80 | + files: 'css/*.css', | |
81 | + tasks: [ 'stylesheets' ] | |
82 | + } | |
83 | + } | |
84 | + */ | |
85 | + | |
86 | + | |
87 | + //initconfig over | |
88 | + }); | |
89 | + | |
90 | + /* | |
91 | + * Load the task. | |
92 | + */ | |
93 | + grunt.loadNpmTasks( "grunt-contrib-clean" ); | |
94 | + grunt.loadNpmTasks( "grunt-contrib-cssmin" ); | |
95 | + grunt.loadNpmTasks( "grunt-contrib-uglify" ); | |
96 | + //grunt.loadNpmTasks( "grunt-contrib-imagemin" ); | |
97 | + | |
98 | + /* | |
99 | + * register the task. | |
100 | + */ | |
101 | + grunt.registerTask( 'default', | |
102 | + [ | |
103 | + 'cssmin' | |
104 | + ,'uglify' | |
105 | + //,'imagemin' | |
106 | + ] | |
107 | + ); | |
108 | + | |
109 | + /* | |
110 | + * Deal with the css when the file is changed. | |
111 | + grunt.registerTask( 'stylesheets', | |
112 | + [ | |
113 | + 'cssmin' | |
114 | + ] | |
115 | + ); | |
116 | + */ | |
117 | + | |
118 | +} | ... | ... |
css/404.css
0 → 100644
1 | +++ a/css/404.css | |
1 | +@import 'Jselect_ui.css'; | |
2 | +@import 'input_ui.css'; | |
3 | +@import 'region_ui.css'; | |
4 | +@import 'guide.css'; | |
5 | + | |
6 | +body { | |
7 | + position: relative; | |
8 | + height: 100%; | |
9 | +} | |
10 | +.whitebox { | |
11 | + margin-bottom: 100px; | |
12 | + text-align: center; | |
13 | + border: 0; | |
14 | + background-color: transparent; | |
15 | + font: 18px/1 'Microsoft YaHei'; | |
16 | +} | |
17 | +.whitebox p { | |
18 | + padding: 20px 0; | |
19 | +} | |
0 | 20 | \ No newline at end of file | ... | ... |
css/Jselect_ui.css
0 → 100644
1 | +++ a/css/Jselect_ui.css | |
1 | +.pack_jselect { | |
2 | + /*position: absolute;*/ | |
3 | + display: inline-block; | |
4 | + background: #fff; | |
5 | + font-size: 12px; | |
6 | + vertical-align: middle; | |
7 | + min-width: 100px; | |
8 | + *display: inline; | |
9 | + *zoom: 1; | |
10 | + position: relative; | |
11 | +} | |
12 | + | |
13 | + | |
14 | +.poppage .pack_jselect { | |
15 | + position: relative; | |
16 | +} | |
17 | + | |
18 | +/* 选中项 */ | |
19 | +.pack_jselect div { | |
20 | + overflow: hidden; | |
21 | + white-space: nowrap; | |
22 | + cursor:pointer; | |
23 | + height: 30px; | |
24 | + background: #fff; | |
25 | + position: relative; | |
26 | + border: 1px solid #ddd; | |
27 | + text-align: left; | |
28 | +} | |
29 | +.pack_jselect div:hover{ | |
30 | + /*border-color: #666; | |
31 | + box-shadow: 0 0 4px #ccc;*/ | |
32 | +} | |
33 | +.pack_jselect div span { | |
34 | + width: 100%; | |
35 | + display: block; | |
36 | +} | |
37 | +.pack_jselect.model_disabled div { | |
38 | + cursor: default; | |
39 | +} | |
40 | +.pack_jselect div span { | |
41 | + display: inline-block; | |
42 | + line-height: 30px; | |
43 | + padding: 0 10px; | |
44 | + overflow: hidden; | |
45 | +} | |
46 | +/* 箭头样式 */ | |
47 | +.pack_jselect div em { | |
48 | + background:white; | |
49 | + display: inline-block; | |
50 | + width: 25px; | |
51 | + height: 30px; | |
52 | + padding: 0; | |
53 | + position: absolute; | |
54 | + right: 0px; | |
55 | +} | |
56 | +.pack_jselect div em em { | |
57 | + display: inline-block; | |
58 | + height: 0; | |
59 | + width: 0; | |
60 | + padding: 0; | |
61 | + margin: 0; | |
62 | + left: 5px; | |
63 | + top: 12px; | |
64 | + border: 5px solid #666; | |
65 | + border-top-color: #666; | |
66 | + border-left-color: transparent; | |
67 | + border-right-color: transparent; | |
68 | + border-bottom-color: transparent; | |
69 | +} | |
70 | + | |
71 | +/* 模拟的下拉框样式 */ | |
72 | +.pack_jselect .s-pack_jselect-list{ | |
73 | + overflow: visible; | |
74 | + position: absolute; | |
75 | + /*position: relative;*/ | |
76 | + background: #fff; | |
77 | + border: 1px solid #ddd; | |
78 | + margin: -32px 0 0 0; | |
79 | + left: 0; | |
80 | +} | |
81 | +.pack_jselect li { | |
82 | + cursor:pointer; | |
83 | + min-height: 18px; | |
84 | + line-height: 18px; | |
85 | + padding: 6px 10px; | |
86 | + list-style: none; | |
87 | + text-align: left; | |
88 | + float: none !important; | |
89 | + clear: both; | |
90 | + margin: 0 !important; | |
91 | +} | |
92 | +.pack_jselect .s-select-bar{ | |
93 | + padding: 0; | |
94 | + border-bottom: 1px #ccc solid; | |
95 | +} | |
96 | +.pack_jselect .s-select-bar input{ | |
97 | + width: 100%; | |
98 | + height: 30px; | |
99 | + line-height: 30px; | |
100 | + border: 0; | |
101 | + background: url('../../images/yy-rnso.png') right center no-repeat; | |
102 | +} | |
103 | +.pack_jselect-selected, | |
104 | +.pack_jselect li:hover { | |
105 | + background: #3cb04d; | |
106 | + color: #fff; | |
107 | +} | |
108 | +.pack_jselect-selected{ | |
109 | + color: #333 !important; | |
110 | +} | |
111 | +.pack_jselect-selected, .pack_jselect-selected:hover { | |
112 | + background: #eee; | |
113 | +} | |
114 | +.pack_jselect-selected:hover { | |
115 | + background: #eee !important; | |
116 | + | |
117 | +} | |
118 | + | |
119 | +.pack_jselect li.disabled_click.pack_jselect-selected, | |
120 | +.pack_jselect li.disabled_click, | |
121 | +.pack_jselect li.disabled_click:hover { | |
122 | + cursor: text; | |
123 | + background: none; | |
124 | + color: #ddd !important; | |
125 | +} | |
126 | + | |
127 | +/* 该样式加在原始 option 上,由js 自动附加到 模型上 */ | |
128 | +li.select_please { | |
129 | + background: #fff; | |
130 | + color: #ccc; | |
131 | + border-bottom: 1px solid #ccc; | |
132 | + margin: 0 8px; | |
133 | + padding: 5px 10px; | |
134 | +} | |
135 | +li.select_please:hover { | |
136 | + background: none!important; | |
137 | + color: #666; | |
138 | +} | |
139 | +/* 如果选择的是含有原始class 的 option 则同样将该样式附加到已经选择的选项框的样式上 */ | |
140 | +div.select_please { | |
141 | + color: #999; | |
142 | +} | |
143 | +.pack_jselect-selected.select_please, li.select_please:hover { | |
144 | + color: #ccc !important; | |
145 | +} | |
146 | + | |
147 | +/* 原始select 不可用 */ | |
148 | +.disabled, | |
149 | +.model_disabled div { | |
150 | + background: #eee; | |
151 | + color: #bbbbbb; | |
152 | +} | |
153 | +.model_disabled div em.pack_jselect_arrow, .model_disabled div em.pack_jselect_arrow em { | |
154 | + background: #eee; | |
155 | +} | |
156 | +.model_disabled, .model_disabled .select_please, .model_disabled .pack_jselect div { | |
157 | + cursor: default; | |
158 | +} | |
159 | +.disabled { | |
160 | + /*border: 1px solid #999;*/ | |
161 | +} | |
162 | + | |
163 | + | |
164 | +/* 色块通用class */ | |
165 | +.s-color { | |
166 | + display: inline-block; | |
167 | + width: 15px; | |
168 | + height: 15px; | |
169 | + vertical-align: middle; | |
170 | + margin-right: 5px; | |
171 | + border: 1px solid #999; | |
172 | +} | ... | ... |
css/addrmanage.css
0 → 100644
1 | +++ a/css/addrmanage.css | |
1 | +@import 'table_ui.css'; | |
2 | +@import 'input_ui.css'; | |
3 | +@import 'region_ui.css'; | |
4 | +@import 'fancyalter_ui.css'; | |
5 | + | |
6 | +.userbox .whitebox { | |
7 | + padding: 40px 0; | |
8 | +} | |
9 | +.downarrow { | |
10 | + width: 0; | |
11 | + height: 0; | |
12 | + border-width: 6px 8px 0 8px; | |
13 | + border-color: #f0f0f0 transparent transparent transparent; | |
14 | + border-style: solid; | |
15 | + position: absolute; | |
16 | + bottom: -5px; | |
17 | + left: 50%; | |
18 | + margin-left: -8px; | |
19 | +} | |
20 | +.tabbox li { | |
21 | + position: relative; | |
22 | + font: 14px/1 'Microsoft YaHei'; | |
23 | +} | |
24 | +.tabbox .ll .bt { | |
25 | + background-color: #f0f0f0; | |
26 | + color: #333; | |
27 | +} | |
28 | +.tabbox .ll .current, | |
29 | +.tabbox .ll a:hover { | |
30 | + background-color: #3cb04d; | |
31 | + color: #fff; | |
32 | +} | |
33 | +.tabbox .ll { | |
34 | + margin-right: 10px; | |
35 | +} | |
36 | +.tabbox .bt { | |
37 | + border-radius: 0; | |
38 | + padding: 5px 20px; | |
39 | +} | |
40 | +.tabbox .bt:hover .downarrow, | |
41 | +.tabbox .current .downarrow { | |
42 | + border-color: #3cb04d transparent transparent transparent; | |
43 | +} | |
44 | +.tab2list tbody .x1 { | |
45 | + padding-left: 80px; | |
46 | +} | |
47 | +.tab2list tbody .x2 { | |
48 | + padding-left: 20px; | |
49 | + width: 30%; | |
50 | +} | |
51 | +.tab2list tbody td { | |
52 | + border-bottom: 1px dashed #ddd; | |
53 | +} | |
54 | +.tab2list p { | |
55 | + padding: 5px 0; | |
56 | +} | |
57 | +.fancy-alter { | |
58 | + padding: 20px 80px; | |
59 | +} | |
60 | +.colortab td { | |
61 | + padding: 10px 0; | |
62 | + text-align: left; | |
63 | + vertical-align: top; | |
64 | +} | |
65 | +.did { | |
66 | + width: 116px; | |
67 | + display: inline-block; | |
68 | + *display: inline; | |
69 | + *zoom: 1; | |
70 | +} | |
71 | +.did input.did { | |
72 | + width: 111px; | |
73 | +} | |
74 | +.fancy-alter .Simu { | |
75 | + vertical-align: top; | |
76 | +} | |
77 | +.ques_ans { | |
78 | + font: 13px/1 'Microsoft YaHei'; | |
79 | +} | |
80 | +.ques_ans .ques { | |
81 | + font-weight: 100; | |
82 | + padding-bottom: 10px; | |
83 | +} | |
84 | +.ques_ans p { | |
85 | + padding: 5px 0; | |
86 | +} | |
87 | +.ques_ans .qadetail { | |
88 | + margin-bottom: 30px; | |
89 | +} | |
0 | 90 | \ No newline at end of file | ... | ... |
css/back.css
0 → 100644
1 | +++ a/css/back.css | |
1 | +@import 'init_module.css'; | |
2 | +@import 'public_ui.css'; | |
3 | +@import 'header_ui.css'; | |
4 | +@import 'footer_index_ui.css'; | |
5 | +@import 'bread_ui.css'; | |
6 | +@import 'box_ui.css'; | |
7 | +@import 'leftnav_ui.css'; | |
8 | +@import 'fancybox/jquery.fancybox.css'; | |
9 | +@import 'fancylogin.css'; | |
10 | +@import 'page_ui.css'; | |
11 | + | |
12 | +body { | |
13 | + background-color: #f9f9f9; | |
14 | +} | ... | ... |
css/blank.gif
0 → 100644
43 Bytes
css/box_ui.css
0 → 100644
1 | +++ a/css/box_ui.css | |
1 | +.whitebox { | |
2 | + border: 1px solid #ddd; | |
3 | + background-color: #fff; | |
4 | + padding: 40px 0; | |
5 | + margin-bottom: 40px; | |
6 | +} | |
7 | +.whiteinner { | |
8 | + padding: 0 40px; | |
9 | + min-height: 400px; | |
10 | +} | |
11 | +.whead { | |
12 | + font: 16px/1 'Microsoft YaHei'; | |
13 | +} | |
14 | +.wbody { | |
15 | + padding-left: 40px; | |
16 | +} | |
17 | +.wfoot { | |
18 | + text-align: center; | |
19 | + padding: 30px 0; | |
20 | +} | ... | ... |
css/bread_ui.css
0 → 100644
1 | +++ a/css/bread_ui.css | |
1 | +/* 面包屑 */ | |
2 | +.bread-line{ | |
3 | + | |
4 | +} | |
5 | +.bread-line ul{ | |
6 | + margin: 0 auto; | |
7 | +} | |
8 | +.bread-line li{ | |
9 | + float: left; | |
10 | + margin-right: 10px; | |
11 | + line-height: 1; | |
12 | + padding: 15px 0; | |
13 | +} | |
14 | +.bread-line li a{ | |
15 | + font-size: 13px; | |
16 | + margin-right: 10px; | |
17 | + color: #999; | |
18 | +} | |
19 | +.location { | |
20 | + width: 18px; | |
21 | + height: 24px; | |
22 | + margin-top: -7px; | |
23 | + background-position: 0 -64px; | |
24 | +} | ... | ... |
css/carbox_ui.css
0 → 100644
1 | +++ a/css/carbox_ui.css | |
1 | +.card { | |
2 | + width: 190px; | |
3 | + height: 60px; | |
4 | + position: relative; | |
5 | + margin-left: 40px; | |
6 | +} | |
7 | +.card .cardaddr, | |
8 | +.card .cardname, | |
9 | +.card .cardphone, | |
10 | +.card .ic { | |
11 | + position: absolute; | |
12 | +} | |
13 | +.card .cardaddr { | |
14 | + bottom: 0; | |
15 | + width: 100%; | |
16 | + height: 28px; | |
17 | + line-height: 1.4; | |
18 | + overflow: hidden; | |
19 | + text-align: left; | |
20 | + color: #999; | |
21 | +} | |
22 | +.card .cardname { | |
23 | + left: 0; | |
24 | + top: 0; | |
25 | +} | |
26 | +.card .cardphone { | |
27 | + right: 0; | |
28 | + top: 0; | |
29 | +} | |
30 | +.card .ic { | |
31 | + width: 20px; | |
32 | + height: 30px; | |
33 | + background-position: -188px -69px; | |
34 | + left: -40px; | |
35 | + top: 6px; | |
36 | + color: #fff; | |
37 | + text-align: center; | |
38 | +} | |
39 | +.end { | |
40 | + margin-top: 20px; | |
41 | +} | |
42 | +.cardbox { | |
43 | + width: 160px; | |
44 | +} | ... | ... |
css/cardbox.css
0 → 100644
1 | +++ a/css/cardbox.css | |
1 | +.card { | |
2 | + width: 190px; | |
3 | + height: 60px; | |
4 | + position: relative; | |
5 | + margin-left: 40px; | |
6 | +} | |
7 | +.card .cardaddr, | |
8 | +.card .cardname, | |
9 | +.card .cardphone, | |
10 | +.card .ic { | |
11 | + position: absolute; | |
12 | +} | |
13 | +.card .cardaddr { | |
14 | + bottom: 0; | |
15 | + width: 100%; | |
16 | + height: 28px; | |
17 | + line-height: 1.2; | |
18 | + overflow: hidden; | |
19 | + text-align: left; | |
20 | +} | |
21 | +.card .cardname { | |
22 | + left: 0; | |
23 | + top: 0; | |
24 | +} | |
25 | +.card .cardphone { | |
26 | + right: 0; | |
27 | + top: 0; | |
28 | +} | |
29 | +.card .ic { | |
30 | + width: 20px; | |
31 | + height: 30px; | |
32 | + background-position: -188px -69px; | |
33 | + left: -40px; | |
34 | + top: 16px; | |
35 | + color: #fff; | |
36 | + text-align: center; | |
37 | +} | |
38 | +.end { | |
39 | + margin-top: 20px; | |
40 | +} | |
41 | +.cardbox { | |
42 | + width: 160px; | |
43 | +} | ... | ... |
css/cashmanage.css
0 → 100644
1 | +++ a/css/cashmanage.css | |
1 | +@import 'table_ui.css'; | |
2 | + | |
3 | +.userbox .whitebox { | |
4 | + padding: 30px 0; | |
5 | +} | |
6 | +.thismonth { | |
7 | + background-color: #3cb04d; | |
8 | + padding: 15px 20px; | |
9 | + color: #fff; | |
10 | +} | |
11 | +.get { | |
12 | + padding: 10px 0 0 27px; | |
13 | +} | |
14 | +.get .bt { | |
15 | + height: 20px; | |
16 | + line-height: 20px; | |
17 | +} | |
18 | +.bor { | |
19 | + border-bottom: 1px dashed #ddd; | |
20 | + padding-bottom: 20px; | |
21 | +} | |
22 | +.totally { | |
23 | + | |
24 | +} | |
25 | +.tabbox { | |
26 | + border: 1px solid #ddd; | |
27 | +} | |
28 | +.tab2list thead td { | |
29 | + background-color: #fff; | |
30 | + color: #666; | |
31 | +} | |
32 | +.timearea { | |
33 | + text-align: right; | |
34 | +} | |
35 | +.time, | |
36 | +.timearea .bt { | |
37 | + height: 20px; | |
38 | + line-height: 20px; | |
39 | +} | |
40 | +.time { | |
41 | + width: 80px; | |
42 | +} | |
43 | +.timearea .s-defval { | |
44 | + text-align: left; | |
45 | +} | |
46 | +.tab2list tbody td { | |
47 | + background-color: #fafafa; | |
48 | +} | |
49 | +.tab2list tfoot td { | |
50 | + padding: 10px 0; | |
51 | + border-top: 1px solid #ddd; | |
52 | +} | |
53 | +.tab2list .childhd td { | |
54 | + border: solid #ddd; | |
55 | + border-width: 1px 0; | |
56 | +} | |
57 | +.recent { | |
58 | + padding-left: 20px; | |
59 | +} | |
60 | +.timearea { | |
61 | + padding-right: 20px; | |
62 | +} | ... | ... |
css/close.png
0 → 100644
1.09 KB
css/comp.css
0 → 100644
1 | +++ a/css/comp.css | |
1 | +@import 'table_ui.css'; | |
2 | + | |
3 | +.lf { | |
4 | + width: 45%; | |
5 | +} | |
6 | +.rt { | |
7 | + width: 54%; | |
8 | +} | |
9 | +.tab2list tbody td { | |
10 | + padding: 20px 0; | |
11 | +} | |
12 | +.tab2list .childhd td { | |
13 | + padding: 10px 0; | |
14 | +} | |
15 | +.tab2list tbody .time { | |
16 | + vertical-align: top; | |
17 | +} | |
18 | +.compword { | |
19 | + margin-top: 10px; | |
20 | +} | |
21 | +.tab2list tbody .time { | |
22 | + width: 10%; | |
23 | +} | ... | ... |
css/compinfo.css
0 → 100644
1 | +++ a/css/compinfo.css | |
1 | +@import 'table_ui.css'; | |
2 | +@import 'region_ui.css'; | |
3 | + | |
4 | +.userbox .whitebox { | |
5 | + padding: 30px 0; | |
6 | +} | |
7 | +.minitab td, | |
8 | +.colortab td { | |
9 | + vertical-align: top; | |
10 | +} | |
11 | +.colortab { | |
12 | + margin-left: 20px; | |
13 | +} | |
14 | +.accountinfo { | |
15 | + width: 440px; | |
16 | + padding: 10px 20px; | |
17 | + background-color: #f9f9f9; | |
18 | +} | |
19 | +.accountinfo td { | |
20 | + padding: 5px 10px; | |
21 | +} | |
22 | +.checkbox { | |
23 | + width: 440px; | |
24 | + padding-top: 6px; | |
25 | +} | |
26 | +.checkbox label { | |
27 | + padding-right: 10px; | |
28 | + margin-bottom: 10px; | |
29 | +} | |
30 | +.colortab td { | |
31 | + padding: 10px 0; | |
32 | +} | |
33 | +.colortab td.ar { | |
34 | + padding-top: 16px; | |
35 | +} | |
36 | + | |
37 | + | ... | ... |
css/comping.css
0 → 100644
1 | +++ a/css/comping.css | |
1 | +@import 'table_ui.css'; | |
2 | + | |
3 | +.wbody { | |
4 | + width: 65%; | |
5 | + margin: 20px auto 0 auto; | |
6 | +} | |
7 | +.tab2list tbody td { | |
8 | + vertical-align: top; | |
9 | +} | |
10 | +.tab2list tbody td.ar { | |
11 | + padding-top: 15px; | |
12 | + white-space: nowrap; | |
13 | +} | |
14 | +.tab2list .ipt { | |
15 | + width: 643px; | |
16 | +} | |
17 | +.tab2list .itxt { | |
18 | + width: 628px; | |
19 | + height: 150px; | |
20 | +} | |
21 | +.ar { | |
22 | + color: #666; | |
23 | +} | |
24 | +.tab2list .childhd td { | |
25 | + background-color: transparent; | |
26 | +} | |
27 | +.childhd p { | |
28 | + padding: 15px; | |
29 | + background-color: #f9f9f9; | |
30 | + text-align: left; | |
31 | +} | ... | ... |
css/complete.css
0 → 100644
1 | +++ a/css/complete.css | |
1 | +html, body { | |
2 | + height: 100%; | |
3 | +} | |
4 | +.complete { | |
5 | + text-align: center; | |
6 | + min-height: 120px; | |
7 | +} | |
8 | +.complete p { | |
9 | + text-align: left; | |
10 | +} | |
11 | +.compinner { | |
12 | + position: relative; | |
13 | + padding-left: 200px; | |
14 | +} | |
15 | +.compimg { | |
16 | + position: absolute; | |
17 | + left: 0; | |
18 | + top: 0; | |
19 | +} | |
20 | +.order { | |
21 | + font: 18px/1 'Microsoft YaHei'; | |
22 | +} | |
23 | +.hitword { | |
24 | + font: 20px/1 'Microsoft YaHei'; | |
25 | + color: #666; | |
26 | +} | |
27 | +.hitword .ght { | |
28 | + font: 36px/1 'Microsoft YaHei'; | |
29 | +} | |
30 | +.mainbox { | |
31 | + height: 85%; | |
32 | +} | |
33 | +.wraper { | |
34 | + height: 100%; | |
35 | +} | |
36 | +.wraper .whitebox { | |
37 | + height: 70%; | |
38 | + position: relative; | |
39 | +} | |
40 | +.complete { | |
41 | + position: absolute; | |
42 | + width: 100%; | |
43 | + top: 50%; | |
44 | + margin-top: -70px; | |
45 | +} | ... | ... |
css/compservice.css
0 → 100644
css/coupon.css
0 → 100644
1 | +++ a/css/coupon.css | |
1 | +@import 'search_ui.css'; | |
2 | + | |
3 | +.userbox .whitebox { | |
4 | + padding: 40px 0; | |
5 | + margin-bottom: 100px; | |
6 | +} | |
7 | +.formupper { | |
8 | + width: 420px; | |
9 | +} | |
10 | +.formupper .ipt { | |
11 | + height: 38px; | |
12 | + line-height: 38px; | |
13 | +} | |
14 | +.formupper .bt { | |
15 | + height: 42px; | |
16 | + line-height: 42px; | |
17 | + padding: 0 20px; | |
18 | +} | |
19 | +.colortab { | |
20 | + width: 70%; | |
21 | + border-top: 1px solid #ddd; | |
22 | +} | |
23 | +.colortab .al { | |
24 | + padding: 10px 0 10px 20px; | |
25 | +} | |
26 | +.colortab .ar { | |
27 | + padding: 10px 20px 10px 0; | |
28 | +} | |
29 | +.colortab .disabled td { | |
30 | + background-color: #fafafa; | |
31 | +} | |
32 | +.empty { | |
33 | + padding: 35px 0; | |
34 | +} | |
35 | +.emptytag { | |
36 | + width: 400px; | |
37 | + margin: 0 auto; | |
38 | +} | ... | ... |
css/ensurefaith.css
0 → 100644
css/ensureorder.css
0 → 100644
1 | +++ a/css/ensureorder.css | |
1 | +@import 'table_ui.css'; | |
2 | +@import 'input_ui.css'; | |
3 | + | |
4 | +.whitebox { | |
5 | + padding: 0; | |
6 | + margin-bottom: 100px; | |
7 | +} | |
8 | +fieldset { | |
9 | + padding: 30px 0 40px 0; | |
10 | + margin: 0 60px 0 50px; | |
11 | + border-bottom: 1px dashed #ddd; | |
12 | +} | |
13 | +.greyarea { | |
14 | + background-color: #fafafa; | |
15 | + padding: 10px 20px; | |
16 | + margin-top: 5px; | |
17 | +} | |
18 | +.greyarea p { | |
19 | + padding: 5px 0; | |
20 | +} | |
21 | +.shd { | |
22 | + font: 16px/1 'Microsoft YaHei'; | |
23 | + margin-bottom: 15px; | |
24 | +} | |
25 | +.sbd { | |
26 | + margin-left: 30px; | |
27 | +} | |
28 | +.colortab { | |
29 | + width: 100%; | |
30 | +} | |
31 | +.colortab .ar { | |
32 | + width: 10%; | |
33 | +} | |
34 | +.colortab td { | |
35 | + padding: 10px 0; | |
36 | +} | |
37 | +.iarrow { | |
38 | + width: 36px; | |
39 | + height: 36px; | |
40 | + margin: 0 30px; | |
41 | + background-position: -136px -163px; | |
42 | +} | |
43 | +.cardbox { | |
44 | + position: relative; | |
45 | + height: 82px; | |
46 | +} | |
47 | +.cdinner { | |
48 | + position: absolute; | |
49 | + width: 560px; | |
50 | +} | |
51 | +.card { | |
52 | + width: 190px; | |
53 | + height: 56px; | |
54 | + border: 3px solid #ddd; | |
55 | + background-color: #fafafa; | |
56 | + padding: 10px; | |
57 | + position: relative; | |
58 | +} | |
59 | +.card .ic, | |
60 | +.card .addr, | |
61 | +.card .nam, | |
62 | +.card .pho { | |
63 | + position: absolute; | |
64 | +} | |
65 | +.card .addr { | |
66 | + line-height: 1.4; | |
67 | + top: 34px; | |
68 | + left: 10px; | |
69 | + width: 190px; | |
70 | + max-height: 32px; | |
71 | + overflow: hidden; | |
72 | +} | |
73 | +.card .nam { | |
74 | + left: 10px; | |
75 | +} | |
76 | +.card .pho { | |
77 | + right: 10px; | |
78 | +} | |
79 | +.card .ic { | |
80 | + width: 20px; | |
81 | + height: 26px; | |
82 | + background-position: -219px -70px; | |
83 | + top: 6px; | |
84 | + left: -16px; | |
85 | + color: #fff; | |
86 | + text-align: center; | |
87 | +} | |
88 | +.start { | |
89 | + margin-left: 36px; | |
90 | +} | |
91 | +.greyarea, | |
92 | +.whitearea { | |
93 | + margin-left: 36px; | |
94 | +} | |
95 | +.totalmoney { | |
96 | + font: 20px/1 'Microsoft YaHei'; | |
97 | +} | |
98 | +.totalmoney b { | |
99 | + font-weight: 100; | |
100 | + font-size: 30px; | |
101 | +} | |
102 | +.yourtic { | |
103 | + display: none; | |
104 | +} | |
105 | +.yourtic label { | |
106 | + display: inline-block; | |
107 | + *display: inline; | |
108 | + *zoom: 1; | |
109 | +} | |
110 | +.yourtic label { | |
111 | + width: 240px; | |
112 | +} | ... | ... |
css/fancyalter_ui.css
0 → 100644
1 | +++ a/css/fancyalter_ui.css | |
1 | +.fancy-alter { | |
2 | + display: none; | |
3 | + padding: 20px; | |
4 | + min-width: 240px; | |
5 | +} | |
6 | +.fancy-alter .alterhd { | |
7 | + text-align: center; | |
8 | + font: 18px/1 'Microsoft YaHei'; | |
9 | +} | |
10 | +.fancy-alter .alterbd { | |
11 | + text-align: center; | |
12 | +} | |
13 | +.fancy-alter .alterft { | |
14 | + text-align: center; | |
15 | +} | ... | ... |
css/fancyappoint_ui.css
0 → 100644
1 | +++ a/css/fancyappoint_ui.css | |
1 | +.formupper { | |
2 | + width: 280px; | |
3 | + padding-bottom: 15px; | |
4 | + border-bottom: 1px dashed #ddd; | |
5 | +} | |
6 | +.formupper .ipt { | |
7 | + height: 30px; | |
8 | + line-height: 30px; | |
9 | +} | |
10 | +.formupper .bt { | |
11 | + height: 34px; | |
12 | + line-height: 34px; | |
13 | +} | |
14 | +.formsub .ic { | |
15 | + background-position: -158px -62px; | |
16 | + background-color: #4aca10; | |
17 | +} | |
18 | +.mini { | |
19 | + height: 20px; | |
20 | + line-height: 20px | |
21 | +} | |
22 | +.carinfo { | |
23 | + margin: 10px 0; | |
24 | + width: 400px; | |
25 | + max-height: 192px; | |
26 | + overflow-x: hidden; | |
27 | + overflow-y: auto; | |
28 | +} | |
29 | +.carinfo .mini { | |
30 | + padding: 0 5px; | |
31 | + border-radius: 0; | |
32 | +} | |
33 | +.minitab td { | |
34 | + padding: 5px; | |
35 | +} | |
36 | +.carsub { | |
37 | + text-align: center; | |
38 | +} | |
39 | +.carsub { | |
40 | + padding-top: 10px; | |
41 | + margin-top: 10px; | |
42 | + border-top: 1px dashed #ddd; | |
43 | +} | |
44 | +.carsub p { | |
45 | + padding: 5px 10px; | |
46 | + background-color: #f9f9f9; | |
47 | + text-align: left; | |
48 | +} | |
49 | +.dw { | |
50 | + width: 60px; | |
51 | +} | |
52 | + | ... | ... |
css/fancybox/blank.gif
0 → 100644
43 Bytes
css/fancybox/close.png
0 → 100644
1.09 KB
css/fancybox/fancybox_loading.gif
0 → 100644
6.41 KB
css/fancybox/fancybox_loading@2x.gif
0 → 100644
13.7 KB
css/fancybox/fancybox_overlay.png
0 → 100644
1012 Bytes
css/fancybox/fancybox_sprite.png
0 → 100644
2.64 KB
css/fancybox/fancybox_sprite@2x.png
0 → 100644
6.4 KB
css/fancybox/helpers/fancybox_buttons.png
0 → 100644
1.05 KB
css/fancybox/helpers/jquery.fancybox-buttons.css
0 → 100644
1 | +++ a/css/fancybox/helpers/jquery.fancybox-buttons.css | |
1 | +#fancybox-buttons { | |
2 | + position: fixed; | |
3 | + left: 0; | |
4 | + width: 100%; | |
5 | + z-index: 8050; | |
6 | +} | |
7 | + | |
8 | +#fancybox-buttons.top { | |
9 | + top: 10px; | |
10 | +} | |
11 | + | |
12 | +#fancybox-buttons.bottom { | |
13 | + bottom: 10px; | |
14 | +} | |
15 | + | |
16 | +#fancybox-buttons ul { | |
17 | + display: block; | |
18 | + width: 166px; | |
19 | + height: 30px; | |
20 | + margin: 0 auto; | |
21 | + padding: 0; | |
22 | + list-style: none; | |
23 | + border: 1px solid #111; | |
24 | + border-radius: 3px; | |
25 | + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); | |
26 | + -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); | |
27 | + box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); | |
28 | + background: rgb(50,50,50); | |
29 | + background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); | |
30 | + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); | |
31 | + background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
32 | + background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
33 | + background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
34 | + background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
35 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); | |
36 | +} | |
37 | + | |
38 | +#fancybox-buttons ul li { | |
39 | + float: left; | |
40 | + margin: 0; | |
41 | + padding: 0; | |
42 | +} | |
43 | + | |
44 | +#fancybox-buttons a { | |
45 | + display: block; | |
46 | + width: 30px; | |
47 | + height: 30px; | |
48 | + text-indent: -9999px; | |
49 | + background-color: transparent; | |
50 | + background-image: url('fancybox_buttons.png'); | |
51 | + background-repeat: no-repeat; | |
52 | + outline: none; | |
53 | + opacity: 0.8; | |
54 | +} | |
55 | + | |
56 | +#fancybox-buttons a:hover { | |
57 | + opacity: 1; | |
58 | +} | |
59 | + | |
60 | +#fancybox-buttons a.btnPrev { | |
61 | + background-position: 5px 0; | |
62 | +} | |
63 | + | |
64 | +#fancybox-buttons a.btnNext { | |
65 | + background-position: -33px 0; | |
66 | + border-right: 1px solid #3e3e3e; | |
67 | +} | |
68 | + | |
69 | +#fancybox-buttons a.btnPlay { | |
70 | + background-position: 0 -30px; | |
71 | +} | |
72 | + | |
73 | +#fancybox-buttons a.btnPlayOn { | |
74 | + background-position: -30px -30px; | |
75 | +} | |
76 | + | |
77 | +#fancybox-buttons a.btnToggle { | |
78 | + background-position: 3px -60px; | |
79 | + border-left: 1px solid #111; | |
80 | + border-right: 1px solid #3e3e3e; | |
81 | + width: 35px | |
82 | +} | |
83 | + | |
84 | +#fancybox-buttons a.btnToggleOn { | |
85 | + background-position: -27px -60px; | |
86 | +} | |
87 | + | |
88 | +#fancybox-buttons a.btnClose { | |
89 | + border-left: 1px solid #111; | |
90 | + width: 35px; | |
91 | + background-position: -56px 0px; | |
92 | +} | |
93 | + | |
94 | +#fancybox-buttons a.btnDisabled { | |
95 | + opacity : 0.4; | |
96 | + cursor: default; | |
97 | +} | |
0 | 98 | \ No newline at end of file | ... | ... |
css/fancybox/helpers/jquery.fancybox-buttons.js
0 → 100644
1 | +++ a/css/fancybox/helpers/jquery.fancybox-buttons.js | |
1 | + /*! | |
2 | + * Buttons helper for fancyBox | |
3 | + * version: 1.0.5 (Mon, 15 Oct 2012) | |
4 | + * @requires fancyBox v2.0 or later | |
5 | + * | |
6 | + * Usage: | |
7 | + * $(".fancybox").fancybox({ | |
8 | + * helpers : { | |
9 | + * buttons: { | |
10 | + * position : 'top' | |
11 | + * } | |
12 | + * } | |
13 | + * }); | |
14 | + * | |
15 | + */ | |
16 | +(function ($) { | |
17 | + //Shortcut for fancyBox object | |
18 | + var F = $.fancybox; | |
19 | + | |
20 | + //Add helper object | |
21 | + F.helpers.buttons = { | |
22 | + defaults : { | |
23 | + skipSingle : false, // disables if gallery contains single image | |
24 | + position : 'top', // 'top' or 'bottom' | |
25 | + tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>' | |
26 | + }, | |
27 | + | |
28 | + list : null, | |
29 | + buttons: null, | |
30 | + | |
31 | + beforeLoad: function (opts, obj) { | |
32 | + //Remove self if gallery do not have at least two items | |
33 | + | |
34 | + if (opts.skipSingle && obj.group.length < 2) { | |
35 | + obj.helpers.buttons = false; | |
36 | + obj.closeBtn = true; | |
37 | + | |
38 | + return; | |
39 | + } | |
40 | + | |
41 | + //Increase top margin to give space for buttons | |
42 | + obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; | |
43 | + }, | |
44 | + | |
45 | + onPlayStart: function () { | |
46 | + if (this.buttons) { | |
47 | + this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); | |
48 | + } | |
49 | + }, | |
50 | + | |
51 | + onPlayEnd: function () { | |
52 | + if (this.buttons) { | |
53 | + this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); | |
54 | + } | |
55 | + }, | |
56 | + | |
57 | + afterShow: function (opts, obj) { | |
58 | + var buttons = this.buttons; | |
59 | + | |
60 | + if (!buttons) { | |
61 | + this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); | |
62 | + | |
63 | + buttons = { | |
64 | + prev : this.list.find('.btnPrev').click( F.prev ), | |
65 | + next : this.list.find('.btnNext').click( F.next ), | |
66 | + play : this.list.find('.btnPlay').click( F.play ), | |
67 | + toggle : this.list.find('.btnToggle').click( F.toggle ), | |
68 | + close : this.list.find('.btnClose').click( F.close ) | |
69 | + } | |
70 | + } | |
71 | + | |
72 | + //Prev | |
73 | + if (obj.index > 0 || obj.loop) { | |
74 | + buttons.prev.removeClass('btnDisabled'); | |
75 | + } else { | |
76 | + buttons.prev.addClass('btnDisabled'); | |
77 | + } | |
78 | + | |
79 | + //Next / Play | |
80 | + if (obj.loop || obj.index < obj.group.length - 1) { | |
81 | + buttons.next.removeClass('btnDisabled'); | |
82 | + buttons.play.removeClass('btnDisabled'); | |
83 | + | |
84 | + } else { | |
85 | + buttons.next.addClass('btnDisabled'); | |
86 | + buttons.play.addClass('btnDisabled'); | |
87 | + } | |
88 | + | |
89 | + this.buttons = buttons; | |
90 | + | |
91 | + this.onUpdate(opts, obj); | |
92 | + }, | |
93 | + | |
94 | + onUpdate: function (opts, obj) { | |
95 | + var toggle; | |
96 | + | |
97 | + if (!this.buttons) { | |
98 | + return; | |
99 | + } | |
100 | + | |
101 | + toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); | |
102 | + | |
103 | + //Size toggle button | |
104 | + if (obj.canShrink) { | |
105 | + toggle.addClass('btnToggleOn'); | |
106 | + | |
107 | + } else if (!obj.canExpand) { | |
108 | + toggle.addClass('btnDisabled'); | |
109 | + } | |
110 | + }, | |
111 | + | |
112 | + beforeClose: function () { | |
113 | + if (this.list) { | |
114 | + this.list.remove(); | |
115 | + } | |
116 | + | |
117 | + this.list = null; | |
118 | + this.buttons = null; | |
119 | + } | |
120 | + }; | |
121 | + | |
122 | +}(jQuery)); | ... | ... |
css/fancybox/helpers/jquery.fancybox-media.js
0 → 100644
1 | +++ a/css/fancybox/helpers/jquery.fancybox-media.js | |
1 | +/*! | |
2 | + * Media helper for fancyBox | |
3 | + * version: 1.0.6 (Fri, 14 Jun 2013) | |
4 | + * @requires fancyBox v2.0 or later | |
5 | + * | |
6 | + * Usage: | |
7 | + * $(".fancybox").fancybox({ | |
8 | + * helpers : { | |
9 | + * media: true | |
10 | + * } | |
11 | + * }); | |
12 | + * | |
13 | + * Set custom URL parameters: | |
14 | + * $(".fancybox").fancybox({ | |
15 | + * helpers : { | |
16 | + * media: { | |
17 | + * youtube : { | |
18 | + * params : { | |
19 | + * autoplay : 0 | |
20 | + * } | |
21 | + * } | |
22 | + * } | |
23 | + * } | |
24 | + * }); | |
25 | + * | |
26 | + * Or: | |
27 | + * $(".fancybox").fancybox({, | |
28 | + * helpers : { | |
29 | + * media: true | |
30 | + * }, | |
31 | + * youtube : { | |
32 | + * autoplay: 0 | |
33 | + * } | |
34 | + * }); | |
35 | + * | |
36 | + * Supports: | |
37 | + * | |
38 | + * Youtube | |
39 | + * http://www.youtube.com/watch?v=opj24KnzrWo | |
40 | + * http://www.youtube.com/embed/opj24KnzrWo | |
41 | + * http://youtu.be/opj24KnzrWo | |
42 | + * http://www.youtube-nocookie.com/embed/opj24KnzrWo | |
43 | + * Vimeo | |
44 | + * http://vimeo.com/40648169 | |
45 | + * http://vimeo.com/channels/staffpicks/38843628 | |
46 | + * http://vimeo.com/groups/surrealism/videos/36516384 | |
47 | + * http://player.vimeo.com/video/45074303 | |
48 | + * Metacafe | |
49 | + * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ | |
50 | + * http://www.metacafe.com/watch/7635964/ | |
51 | + * Dailymotion | |
52 | + * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people | |
53 | + * Twitvid | |
54 | + * http://twitvid.com/QY7MD | |
55 | + * Twitpic | |
56 | + * http://twitpic.com/7p93st | |
57 | ||
58 | + * http://instagr.am/p/IejkuUGxQn/ | |
59 | + * http://instagram.com/p/IejkuUGxQn/ | |
60 | + * Google maps | |
61 | + * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 | |
62 | + * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 | |
63 | + * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 | |
64 | + */ | |
65 | +(function ($) { | |
66 | + "use strict"; | |
67 | + | |
68 | + //Shortcut for fancyBox object | |
69 | + var F = $.fancybox, | |
70 | + format = function( url, rez, params ) { | |
71 | + params = params || ''; | |
72 | + | |
73 | + if ( $.type( params ) === "object" ) { | |
74 | + params = $.param(params, true); | |
75 | + } | |
76 | + | |
77 | + $.each(rez, function(key, value) { | |
78 | + url = url.replace( '$' + key, value || '' ); | |
79 | + }); | |
80 | + | |
81 | + if (params.length) { | |
82 | + url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; | |
83 | + } | |
84 | + | |
85 | + return url; | |
86 | + }; | |
87 | + | |
88 | + //Add helper object | |
89 | + F.helpers.media = { | |
90 | + defaults : { | |
91 | + youtube : { | |
92 | + matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, | |
93 | + params : { | |
94 | + autoplay : 1, | |
95 | + autohide : 1, | |
96 | + fs : 1, | |
97 | + rel : 0, | |
98 | + hd : 1, | |
99 | + wmode : 'opaque', | |
100 | + enablejsapi : 1 | |
101 | + }, | |
102 | + type : 'iframe', | |
103 | + url : '//www.youtube.com/embed/$3' | |
104 | + }, | |
105 | + vimeo : { | |
106 | + matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, | |
107 | + params : { | |
108 | + autoplay : 1, | |
109 | + hd : 1, | |
110 | + show_title : 1, | |
111 | + show_byline : 1, | |
112 | + show_portrait : 0, | |
113 | + fullscreen : 1 | |
114 | + }, | |
115 | + type : 'iframe', | |
116 | + url : '//player.vimeo.com/video/$1' | |
117 | + }, | |
118 | + metacafe : { | |
119 | + matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, | |
120 | + params : { | |
121 | + autoPlay : 'yes' | |
122 | + }, | |
123 | + type : 'swf', | |
124 | + url : function( rez, params, obj ) { | |
125 | + obj.swf.flashVars = 'playerVars=' + $.param( params, true ); | |
126 | + | |
127 | + return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; | |
128 | + } | |
129 | + }, | |
130 | + dailymotion : { | |
131 | + matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, | |
132 | + params : { | |
133 | + additionalInfos : 0, | |
134 | + autoStart : 1 | |
135 | + }, | |
136 | + type : 'swf', | |
137 | + url : '//www.dailymotion.com/swf/video/$1' | |
138 | + }, | |
139 | + twitvid : { | |
140 | + matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, | |
141 | + params : { | |
142 | + autoplay : 0 | |
143 | + }, | |
144 | + type : 'iframe', | |
145 | + url : '//www.twitvid.com/embed.php?guid=$1' | |
146 | + }, | |
147 | + twitpic : { | |
148 | + matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, | |
149 | + type : 'image', | |
150 | + url : '//twitpic.com/show/full/$1/' | |
151 | + }, | |
152 | + instagram : { | |
153 | + matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, | |
154 | + type : 'image', | |
155 | + url : '//$1/p/$2/media/?size=l' | |
156 | + }, | |
157 | + google_maps : { | |
158 | + matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, | |
159 | + type : 'iframe', | |
160 | + url : function( rez ) { | |
161 | + return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); | |
162 | + } | |
163 | + } | |
164 | + }, | |
165 | + | |
166 | + beforeLoad : function(opts, obj) { | |
167 | + var url = obj.href || '', | |
168 | + type = false, | |
169 | + what, | |
170 | + item, | |
171 | + rez, | |
172 | + params; | |
173 | + | |
174 | + for (what in opts) { | |
175 | + if (opts.hasOwnProperty(what)) { | |
176 | + item = opts[ what ]; | |
177 | + rez = url.match( item.matcher ); | |
178 | + | |
179 | + if (rez) { | |
180 | + type = item.type; | |
181 | + params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); | |
182 | + | |
183 | + url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); | |
184 | + | |
185 | + break; | |
186 | + } | |
187 | + } | |
188 | + } | |
189 | + | |
190 | + if (type) { | |
191 | + obj.href = url; | |
192 | + obj.type = type; | |
193 | + | |
194 | + obj.autoHeight = false; | |
195 | + } | |
196 | + } | |
197 | + }; | |
198 | + | |
199 | +}(jQuery)); | |
0 | 200 | \ No newline at end of file | ... | ... |
css/fancybox/helpers/jquery.fancybox-thumbs.css
0 → 100644
1 | +++ a/css/fancybox/helpers/jquery.fancybox-thumbs.css | |
1 | +#fancybox-thumbs { | |
2 | + position: fixed; | |
3 | + left: 0; | |
4 | + width: 100%; | |
5 | + overflow: hidden; | |
6 | + z-index: 8050; | |
7 | +} | |
8 | + | |
9 | +#fancybox-thumbs.bottom { | |
10 | + bottom: 2px; | |
11 | +} | |
12 | + | |
13 | +#fancybox-thumbs.top { | |
14 | + top: 2px; | |
15 | +} | |
16 | + | |
17 | +#fancybox-thumbs ul { | |
18 | + position: relative; | |
19 | + list-style: none; | |
20 | + margin: 0; | |
21 | + padding: 0; | |
22 | +} | |
23 | + | |
24 | +#fancybox-thumbs ul li { | |
25 | + float: left; | |
26 | + padding: 1px; | |
27 | + opacity: 0.5; | |
28 | +} | |
29 | + | |
30 | +#fancybox-thumbs ul li.active { | |
31 | + opacity: 0.75; | |
32 | + padding: 0; | |
33 | + border: 1px solid #fff; | |
34 | +} | |
35 | + | |
36 | +#fancybox-thumbs ul li:hover { | |
37 | + opacity: 1; | |
38 | +} | |
39 | + | |
40 | +#fancybox-thumbs ul li a { | |
41 | + display: block; | |
42 | + position: relative; | |
43 | + overflow: hidden; | |
44 | + border: 1px solid #222; | |
45 | + background: #111; | |
46 | + outline: none; | |
47 | +} | |
48 | + | |
49 | +#fancybox-thumbs ul li img { | |
50 | + display: block; | |
51 | + position: relative; | |
52 | + border: 0; | |
53 | + padding: 0; | |
54 | + max-width: none; | |
55 | +} | |
0 | 56 | \ No newline at end of file | ... | ... |
css/fancybox/helpers/jquery.fancybox-thumbs.js
0 → 100644
1 | +++ a/css/fancybox/helpers/jquery.fancybox-thumbs.js | |
1 | + /*! | |
2 | + * Thumbnail helper for fancyBox | |
3 | + * version: 1.0.7 (Mon, 01 Oct 2012) | |
4 | + * @requires fancyBox v2.0 or later | |
5 | + * | |
6 | + * Usage: | |
7 | + * $(".fancybox").fancybox({ | |
8 | + * helpers : { | |
9 | + * thumbs: { | |
10 | + * width : 50, | |
11 | + * height : 50 | |
12 | + * } | |
13 | + * } | |
14 | + * }); | |
15 | + * | |
16 | + */ | |
17 | +(function ($) { | |
18 | + //Shortcut for fancyBox object | |
19 | + var F = $.fancybox; | |
20 | + | |
21 | + //Add helper object | |
22 | + F.helpers.thumbs = { | |
23 | + defaults : { | |
24 | + width : 50, // thumbnail width | |
25 | + height : 50, // thumbnail height | |
26 | + position : 'bottom', // 'top' or 'bottom' | |
27 | + source : function ( item ) { // function to obtain the URL of the thumbnail image | |
28 | + var href; | |
29 | + | |
30 | + if (item.element) { | |
31 | + href = $(item.element).find('img').attr('src'); | |
32 | + } | |
33 | + | |
34 | + if (!href && item.type === 'image' && item.href) { | |
35 | + href = item.href; | |
36 | + } | |
37 | + | |
38 | + return href; | |
39 | + } | |
40 | + }, | |
41 | + | |
42 | + wrap : null, | |
43 | + list : null, | |
44 | + width : 0, | |
45 | + | |
46 | + init: function (opts, obj) { | |
47 | + var that = this, | |
48 | + list, | |
49 | + thumbWidth = opts.width, | |
50 | + thumbHeight = opts.height, | |
51 | + thumbSource = opts.source; | |
52 | + | |
53 | + //Build list structure | |
54 | + list = ''; | |
55 | + | |
56 | + for (var n = 0; n < obj.group.length; n++) { | |
57 | + list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>'; | |
58 | + } | |
59 | + | |
60 | + this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body'); | |
61 | + this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap); | |
62 | + | |
63 | + //Load each thumbnail | |
64 | + $.each(obj.group, function (i) { | |
65 | + var href = thumbSource( obj.group[ i ] ); | |
66 | + | |
67 | + if (!href) { | |
68 | + return; | |
69 | + } | |
70 | + | |
71 | + $("<img />").load(function () { | |
72 | + var width = this.width, | |
73 | + height = this.height, | |
74 | + widthRatio, heightRatio, parent; | |
75 | + | |
76 | + if (!that.list || !width || !height) { | |
77 | + return; | |
78 | + } | |
79 | + | |
80 | + //Calculate thumbnail width/height and center it | |
81 | + widthRatio = width / thumbWidth; | |
82 | + heightRatio = height / thumbHeight; | |
83 | + | |
84 | + parent = that.list.children().eq(i).find('a'); | |
85 | + | |
86 | + if (widthRatio >= 1 && heightRatio >= 1) { | |
87 | + if (widthRatio > heightRatio) { | |
88 | + width = Math.floor(width / heightRatio); | |
89 | + height = thumbHeight; | |
90 | + | |
91 | + } else { | |
92 | + width = thumbWidth; | |
93 | + height = Math.floor(height / widthRatio); | |
94 | + } | |
95 | + } | |
96 | + | |
97 | + $(this).css({ | |
98 | + width : width, | |
99 | + height : height, | |
100 | + top : Math.floor(thumbHeight / 2 - height / 2), | |
101 | + left : Math.floor(thumbWidth / 2 - width / 2) | |
102 | + }); | |
103 | + | |
104 | + parent.width(thumbWidth).height(thumbHeight); | |
105 | + | |
106 | + $(this).hide().appendTo(parent).fadeIn(300); | |
107 | + | |
108 | + }).attr('src', href); | |
109 | + }); | |
110 | + | |
111 | + //Set initial width | |
112 | + this.width = this.list.children().eq(0).outerWidth(true); | |
113 | + | |
114 | + this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); | |
115 | + }, | |
116 | + | |
117 | + beforeLoad: function (opts, obj) { | |
118 | + //Remove self if gallery do not have at least two items | |
119 | + if (obj.group.length < 2) { | |
120 | + obj.helpers.thumbs = false; | |
121 | + | |
122 | + return; | |
123 | + } | |
124 | + | |
125 | + //Increase bottom margin to give space for thumbs | |
126 | + obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); | |
127 | + }, | |
128 | + | |
129 | + afterShow: function (opts, obj) { | |
130 | + //Check if exists and create or update list | |
131 | + if (this.list) { | |
132 | + this.onUpdate(opts, obj); | |
133 | + | |
134 | + } else { | |
135 | + this.init(opts, obj); | |
136 | + } | |
137 | + | |
138 | + //Set active element | |
139 | + this.list.children().removeClass('active').eq(obj.index).addClass('active'); | |
140 | + }, | |
141 | + | |
142 | + //Center list | |
143 | + onUpdate: function (opts, obj) { | |
144 | + if (this.list) { | |
145 | + this.list.stop(true).animate({ | |
146 | + 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) | |
147 | + }, 150); | |
148 | + } | |
149 | + }, | |
150 | + | |
151 | + beforeClose: function () { | |
152 | + if (this.wrap) { | |
153 | + this.wrap.remove(); | |
154 | + } | |
155 | + | |
156 | + this.wrap = null; | |
157 | + this.list = null; | |
158 | + this.width = 0; | |
159 | + } | |
160 | + } | |
161 | + | |
162 | +}(jQuery)); | |
0 | 163 | \ No newline at end of file | ... | ... |
css/fancybox/jquery.fancybox.css
0 → 100644
1 | +++ a/css/fancybox/jquery.fancybox.css | |
1 | +/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ | |
2 | +.fancybox-wrap, | |
3 | +.fancybox-skin, | |
4 | +.fancybox-outer, | |
5 | +.fancybox-inner, | |
6 | +.fancybox-image, | |
7 | +.fancybox-wrap iframe, | |
8 | +.fancybox-wrap object, | |
9 | +.fancybox-nav, | |
10 | +.fancybox-nav span, | |
11 | +.fancybox-tmp | |
12 | +{ | |
13 | + padding: 0; | |
14 | + margin: 0; | |
15 | + border: 0; | |
16 | + outline: none; | |
17 | + vertical-align: top; | |
18 | +} | |
19 | + | |
20 | +.fancybox-wrap { | |
21 | + position: absolute; | |
22 | + top: 0; | |
23 | + left: 0; | |
24 | + z-index: 8020; | |
25 | + background: #fff; | |
26 | + box-shadow: 0 0 10px #c0c0c0; | |
27 | +} | |
28 | + | |
29 | +.fancybox-skin { | |
30 | + position: relative; | |
31 | + color: #444; | |
32 | + text-shadow: none; | |
33 | + background: #fff; | |
34 | + border: 1px solid transparent; | |
35 | + padding: 4px; | |
36 | +} | |
37 | + | |
38 | +.fancybox-opened { | |
39 | + z-index: 10000; | |
40 | +} | |
41 | + | |
42 | +.fancybox-opened .fancybox-skin { | |
43 | + /*-webkit-box-shadow: 0 0px 15px #bbb; | |
44 | + -moz-box-shadow: 0 0px 15px #bbb; | |
45 | + box-shadow: 0 0px 15px #bbb;*/ | |
46 | +} | |
47 | + | |
48 | +.fancybox-outer, .fancybox-inner { | |
49 | + position: relative; | |
50 | + background: #fff; | |
51 | + -webkit-border-radius: 4px; | |
52 | + -moz-border-radius: 4px; | |
53 | + border-radius: 4px; | |
54 | + border-radius: 4px; | |
55 | +} | |
56 | + | |
57 | +.fancybox-inner { | |
58 | + overflow: hidden; | |
59 | +} | |
60 | + | |
61 | +.fancybox-type-iframe .fancybox-inner { | |
62 | + -webkit-overflow-scrolling: touch; | |
63 | +} | |
64 | + | |
65 | +.fancybox-error { | |
66 | + color: #444; | |
67 | + font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; | |
68 | + margin: 0; | |
69 | + padding: 15px; | |
70 | + white-space: nowrap; | |
71 | +} | |
72 | + | |
73 | +.fancybox-image, .fancybox-iframe { | |
74 | + display: block; | |
75 | + width: 100%; | |
76 | + height: 100%; | |
77 | +} | |
78 | + | |
79 | +.fancybox-image { | |
80 | + max-width: 100%; | |
81 | + max-height: 100%; | |
82 | +} | |
83 | + | |
84 | +#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { | |
85 | + background-image: url('fancybox_sprite.png'); | |
86 | +} | |
87 | + | |
88 | +#fancybox-loading { | |
89 | + position: fixed; | |
90 | + top: 50%; | |
91 | + left: 50%; | |
92 | + margin-top: -22px; | |
93 | + margin-left: -22px; | |
94 | + background-position: 0 -108px; | |
95 | + opacity: 0.8; | |
96 | + cursor: pointer; | |
97 | + z-index: 8060; | |
98 | +} | |
99 | + | |
100 | +#fancybox-loading div { | |
101 | + width: 44px; | |
102 | + height: 44px; | |
103 | + background: url('fancybox_loading.gif') center center no-repeat; | |
104 | +} | |
105 | + | |
106 | +.fancybox-close { | |
107 | + position: absolute; | |
108 | + top: 0; | |
109 | + right: 0; | |
110 | + width: 30px; | |
111 | + height: 30px; | |
112 | + cursor: pointer; | |
113 | + z-index: 8040; | |
114 | + background: url('close.png') no-repeat; | |
115 | +} | |
116 | + | |
117 | +.fancybox-nav { | |
118 | + position: absolute; | |
119 | + top: 0; | |
120 | + width: 40%; | |
121 | + height: 100%; | |
122 | + cursor: pointer; | |
123 | + text-decoration: none; | |
124 | + background: transparent url('blank.gif'); /* helps IE */ | |
125 | + -webkit-tap-highlight-color: rgba(0,0,0,0); | |
126 | + z-index: 8040; | |
127 | +} | |
128 | + | |
129 | +.fancybox-prev { | |
130 | + left: 0; | |
131 | +} | |
132 | + | |
133 | +.fancybox-next { | |
134 | + right: 0; | |
135 | +} | |
136 | + | |
137 | +.fancybox-nav span { | |
138 | + position: absolute; | |
139 | + top: 50%; | |
140 | + width: 36px; | |
141 | + height: 34px; | |
142 | + margin-top: -18px; | |
143 | + cursor: pointer; | |
144 | + z-index: 8040; | |
145 | + visibility: hidden; | |
146 | +} | |
147 | + | |
148 | +.fancybox-prev span { | |
149 | + left: 10px; | |
150 | + background-position: 0 -36px; | |
151 | +} | |
152 | + | |
153 | +.fancybox-next span { | |
154 | + right: 10px; | |
155 | + background-position: 0 -72px; | |
156 | +} | |
157 | + | |
158 | +.fancybox-nav:hover span { | |
159 | + visibility: visible; | |
160 | +} | |
161 | + | |
162 | +.fancybox-tmp { | |
163 | + position: absolute; | |
164 | + top: -99999px; | |
165 | + left: -99999px; | |
166 | + visibility: hidden; | |
167 | + max-width: 99999px; | |
168 | + max-height: 99999px; | |
169 | + overflow: visible !important; | |
170 | +} | |
171 | + | |
172 | +/* Overlay helper */ | |
173 | + | |
174 | +.fancybox-lock { | |
175 | + overflow: hidden !important; | |
176 | + width: auto; | |
177 | +} | |
178 | + | |
179 | +.fancybox-lock body { | |
180 | + overflow: hidden !important; | |
181 | +} | |
182 | + | |
183 | +.fancybox-lock-test { | |
184 | + overflow-y: hidden !important; | |
185 | +} | |
186 | + | |
187 | +.fancybox-overlay { | |
188 | + position: absolute; | |
189 | + top: 0; | |
190 | + left: 0; | |
191 | + overflow: hidden; | |
192 | + display: none; | |
193 | + z-index: 9999; | |
194 | + background: url('fancybox_overlay.png'); | |
195 | +} | |
196 | + | |
197 | +.fancybox-overlay-fixed { | |
198 | + position: fixed; | |
199 | + bottom: 0; | |
200 | + right: 0; | |
201 | +} | |
202 | + | |
203 | +.fancybox-lock .fancybox-overlay { | |
204 | + overflow: auto; | |
205 | + overflow-y: scroll; | |
206 | +} | |
207 | + | |
208 | +/* Title helper */ | |
209 | + | |
210 | +.fancybox-title { | |
211 | + visibility: hidden; | |
212 | + font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; | |
213 | + position: relative; | |
214 | + text-shadow: none; | |
215 | + z-index: 8050; | |
216 | +} | |
217 | + | |
218 | +.fancybox-opened .fancybox-title { | |
219 | + visibility: visible; | |
220 | +} | |
221 | + | |
222 | +.fancybox-title-float-wrap { | |
223 | + position: absolute; | |
224 | + bottom: 0; | |
225 | + right: 50%; | |
226 | + margin-bottom: -35px; | |
227 | + z-index: 8050; | |
228 | + text-align: center; | |
229 | +} | |
230 | + | |
231 | +.fancybox-title-float-wrap .child { | |
232 | + display: inline-block; | |
233 | + margin-right: -100%; | |
234 | + padding: 2px 20px; | |
235 | + background: transparent; /* Fallback for web browsers that doesn't support RGBa */ | |
236 | + background: rgba(0, 0, 0, 0.8); | |
237 | + -webkit-border-radius: 15px; | |
238 | + -moz-border-radius: 15px; | |
239 | + border-radius: 15px; | |
240 | + text-shadow: 0 1px 2px #222; | |
241 | + color: #FFF; | |
242 | + font-weight: bold; | |
243 | + line-height: 24px; | |
244 | + white-space: nowrap; | |
245 | +} | |
246 | + | |
247 | +.fancybox-title-outside-wrap { | |
248 | + position: relative; | |
249 | + margin-top: 10px; | |
250 | + color: #fff; | |
251 | +} | |
252 | + | |
253 | +.fancybox-title-inside-wrap { | |
254 | + padding-top: 10px; | |
255 | +} | |
256 | + | |
257 | +.fancybox-title-over-wrap { | |
258 | + position: absolute; | |
259 | + bottom: 0; | |
260 | + left: 0; | |
261 | + color: #fff; | |
262 | + padding: 10px; | |
263 | + background: #000; | |
264 | + background: rgba(0, 0, 0, .8); | |
265 | +} | |
266 | + | |
267 | +/*Retina graphics!*/ | |
268 | +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), | |
269 | + only screen and (min--moz-device-pixel-ratio: 1.5), | |
270 | + only screen and (min-device-pixel-ratio: 1.5){ | |
271 | + | |
272 | + #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { | |
273 | + background-image: url('fancybox_sprite@2x.png'); | |
274 | + background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ | |
275 | + } | |
276 | + | |
277 | + #fancybox-loading div { | |
278 | + background-image: url('fancybox_loading@2x.gif'); | |
279 | + background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ | |
280 | + } | |
281 | +} | ... | ... |
css/fancybox/jquery.fancybox.js
0 → 100644
1 | +++ a/css/fancybox/jquery.fancybox.js | |
1 | +/*! | |
2 | + * fancyBox - jQuery Plugin | |
3 | + * version: 2.1.5 (Fri, 14 Jun 2013) | |
4 | + * @requires jQuery v1.6 or later | |
5 | + * | |
6 | + * Examples at http://fancyapps.com/fancybox/ | |
7 | + * License: www.fancyapps.com/fancybox/#license | |
8 | + * | |
9 | + * Copyright 2012 Janis Skarnelis - janis@fancyapps.com | |
10 | + * | |
11 | + */ | |
12 | + | |
13 | +(function (window, document, $, undefined) { | |
14 | + "use strict"; | |
15 | + | |
16 | + var H = $("html"), | |
17 | + W = $(window), | |
18 | + D = $(document), | |
19 | + F = $.fancybox = function () { | |
20 | + F.open.apply( this, arguments ); | |
21 | + }, | |
22 | + IE = navigator.userAgent.match(/msie/i), | |
23 | + didUpdate = null, | |
24 | + isTouch = document.createTouch !== undefined, | |
25 | + | |
26 | + isQuery = function(obj) { | |
27 | + return obj && obj.hasOwnProperty && obj instanceof $; | |
28 | + }, | |
29 | + isString = function(str) { | |
30 | + return str && $.type(str) === "string"; | |
31 | + }, | |
32 | + isPercentage = function(str) { | |
33 | + return isString(str) && str.indexOf('%') > 0; | |
34 | + }, | |
35 | + isScrollable = function(el) { | |
36 | + return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); | |
37 | + }, | |
38 | + getScalar = function(orig, dim) { | |
39 | + var value = parseInt(orig, 10) || 0; | |
40 | + | |
41 | + if (dim && isPercentage(orig)) { | |
42 | + value = F.getViewport()[ dim ] / 100 * value; | |
43 | + } | |
44 | + | |
45 | + return Math.ceil(value); | |
46 | + }, | |
47 | + getValue = function(value, dim) { | |
48 | + return getScalar(value, dim) + 'px'; | |
49 | + }; | |
50 | + | |
51 | + $.extend(F, { | |
52 | + // The current version of fancyBox | |
53 | + version: '2.1.5', | |
54 | + | |
55 | + defaults: { | |
56 | + padding : 15, | |
57 | + margin : 20, | |
58 | + | |
59 | + width : 800, | |
60 | + height : 600, | |
61 | + minWidth : 100, | |
62 | + minHeight : 100, | |
63 | + maxWidth : 9999, | |
64 | + maxHeight : 9999, | |
65 | + pixelRatio: 1, // Set to 2 for retina display support | |
66 | + | |
67 | + autoSize : true, | |
68 | + autoHeight : false, | |
69 | + autoWidth : false, | |
70 | + | |
71 | + autoResize : true, | |
72 | + autoCenter : !isTouch, | |
73 | + fitToView : true, | |
74 | + aspectRatio : false, | |
75 | + topRatio : 0.5, | |
76 | + leftRatio : 0.5, | |
77 | + | |
78 | + scrolling : 'auto', // 'auto', 'yes' or 'no' | |
79 | + wrapCSS : '', | |
80 | + | |
81 | + arrows : true, | |
82 | + closeBtn : true, | |
83 | + closeClick : false, | |
84 | + nextClick : false, | |
85 | + mouseWheel : true, | |
86 | + autoPlay : false, | |
87 | + playSpeed : 3000, | |
88 | + preload : 3, | |
89 | + modal : false, | |
90 | + loop : true, | |
91 | + | |
92 | + ajax : { | |
93 | + dataType : 'html', | |
94 | + headers : { 'X-fancyBox': true } | |
95 | + }, | |
96 | + iframe : { | |
97 | + scrolling : 'auto', | |
98 | + preload : true | |
99 | + }, | |
100 | + swf : { | |
101 | + wmode: 'transparent', | |
102 | + allowfullscreen : 'true', | |
103 | + allowscriptaccess : 'always' | |
104 | + }, | |
105 | + | |
106 | + keys : { | |
107 | + next : { | |
108 | + 13 : 'left', // enter | |
109 | + 34 : 'up', // page down | |
110 | + 39 : 'left', // right arrow | |
111 | + 40 : 'up' // down arrow | |
112 | + }, | |
113 | + prev : { | |
114 | + 8 : 'right', // backspace | |
115 | + 33 : 'down', // page up | |
116 | + 37 : 'right', // left arrow | |
117 | + 38 : 'down' // up arrow | |
118 | + }, | |
119 | + close : [27], // escape key | |
120 | + play : [32], // space - start/stop slideshow | |
121 | + toggle : [70] // letter "f" - toggle fullscreen | |
122 | + }, | |
123 | + | |
124 | + direction : { | |
125 | + next : 'left', | |
126 | + prev : 'right' | |
127 | + }, | |
128 | + | |
129 | + scrollOutside : true, | |
130 | + | |
131 | + // Override some properties | |
132 | + index : 0, | |
133 | + type : null, | |
134 | + href : null, | |
135 | + content : null, | |
136 | + title : null, | |
137 | + | |
138 | + // HTML templates | |
139 | + tpl: { | |
140 | + wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', | |
141 | + image : '<img class="fancybox-image" src="{href}" alt="" />', | |
142 | + iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>', | |
143 | + error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', | |
144 | + closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', | |
145 | + next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', | |
146 | + prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>' | |
147 | + }, | |
148 | + | |
149 | + // Properties for each animation type | |
150 | + // Opening fancyBox | |
151 | + openEffect : 'fade', // 'elastic', 'fade' or 'none' | |
152 | + openSpeed : 250, | |
153 | + openEasing : 'swing', | |
154 | + openOpacity : true, | |
155 | + openMethod : 'zoomIn', | |
156 | + | |
157 | + // Closing fancyBox | |
158 | + closeEffect : 'fade', // 'elastic', 'fade' or 'none' | |
159 | + closeSpeed : 250, | |
160 | + closeEasing : 'swing', | |
161 | + closeOpacity : true, | |
162 | + closeMethod : 'zoomOut', | |
163 | + | |
164 | + // Changing next gallery item | |
165 | + nextEffect : 'elastic', // 'elastic', 'fade' or 'none' | |
166 | + nextSpeed : 250, | |
167 | + nextEasing : 'swing', | |
168 | + nextMethod : 'changeIn', | |
169 | + | |
170 | + // Changing previous gallery item | |
171 | + prevEffect : 'elastic', // 'elastic', 'fade' or 'none' | |
172 | + prevSpeed : 250, | |
173 | + prevEasing : 'swing', | |
174 | + prevMethod : 'changeOut', | |
175 | + | |
176 | + // Enable default helpers | |
177 | + helpers : { | |
178 | + overlay : true, | |
179 | + title : true | |
180 | + }, | |
181 | + | |
182 | + // Callbacks | |
183 | + onCancel : $.noop, // If canceling | |
184 | + beforeLoad : $.noop, // Before loading | |
185 | + afterLoad : $.noop, // After loading | |
186 | + beforeShow : $.noop, // Before changing in current item | |
187 | + afterShow : $.noop, // After opening | |
188 | + beforeChange : $.noop, // Before changing gallery item | |
189 | + beforeClose : $.noop, // Before closing | |
190 | + afterClose : $.noop // After closing | |
191 | + }, | |
192 | + | |
193 | + //Current state | |
194 | + group : {}, // Selected group | |
195 | + opts : {}, // Group options | |
196 | + previous : null, // Previous element | |
197 | + coming : null, // Element being loaded | |
198 | + current : null, // Currently loaded element | |
199 | + isActive : false, // Is activated | |
200 | + isOpen : false, // Is currently open | |
201 | + isOpened : false, // Have been fully opened at least once | |
202 | + | |
203 | + wrap : null, | |
204 | + skin : null, | |
205 | + outer : null, | |
206 | + inner : null, | |
207 | + | |
208 | + player : { | |
209 | + timer : null, | |
210 | + isActive : false | |
211 | + }, | |
212 | + | |
213 | + // Loaders | |
214 | + ajaxLoad : null, | |
215 | + imgPreload : null, | |
216 | + | |
217 | + // Some collections | |
218 | + transitions : {}, | |
219 | + helpers : {}, | |
220 | + | |
221 | + /* | |
222 | + * Static methods | |
223 | + */ | |
224 | + | |
225 | + open: function (group, opts) { | |
226 | + if (!group) { | |
227 | + return; | |
228 | + } | |
229 | + | |
230 | + if (!$.isPlainObject(opts)) { | |
231 | + opts = {}; | |
232 | + } | |
233 | + | |
234 | + // Close if already active | |
235 | + if (false === F.close(true)) { | |
236 | + return; | |
237 | + } | |
238 | + | |
239 | + // Normalize group | |
240 | + if (!$.isArray(group)) { | |
241 | + group = isQuery(group) ? $(group).get() : [group]; | |
242 | + } | |
243 | + | |
244 | + // Recheck if the type of each element is `object` and set content type (image, ajax, etc) | |
245 | + $.each(group, function(i, element) { | |
246 | + var obj = {}, | |
247 | + href, | |
248 | + title, | |
249 | + content, | |
250 | + type, | |
251 | + rez, | |
252 | + hrefParts, | |
253 | + selector; | |
254 | + | |
255 | + if ($.type(element) === "object") { | |
256 | + // Check if is DOM element | |
257 | + if (element.nodeType) { | |
258 | + element = $(element); | |
259 | + } | |
260 | + | |
261 | + if (isQuery(element)) { | |
262 | + obj = { | |
263 | + href : element.data('fancybox-href') || element.attr('href'), | |
264 | + title : element.data('fancybox-title') || element.attr('title'), | |
265 | + isDom : true, | |
266 | + element : element | |
267 | + }; | |
268 | + | |
269 | + if ($.metadata) { | |
270 | + $.extend(true, obj, element.metadata()); | |
271 | + } | |
272 | + | |
273 | + } else { | |
274 | + obj = element; | |
275 | + } | |
276 | + } | |
277 | + | |
278 | + href = opts.href || obj.href || (isString(element) ? element : null); | |
279 | + title = opts.title !== undefined ? opts.title : obj.title || ''; | |
280 | + | |
281 | + content = opts.content || obj.content; | |
282 | + type = content ? 'html' : (opts.type || obj.type); | |
283 | + | |
284 | + if (!type && obj.isDom) { | |
285 | + type = element.data('fancybox-type'); | |
286 | + | |
287 | + if (!type) { | |
288 | + rez = element.prop('class').match(/fancybox\.(\w+)/); | |
289 | + type = rez ? rez[1] : null; | |
290 | + } | |
291 | + } | |
292 | + | |
293 | + if (isString(href)) { | |
294 | + // Try to guess the content type | |
295 | + if (!type) { | |
296 | + if (F.isImage(href)) { | |
297 | + type = 'image'; | |
298 | + | |
299 | + } else if (F.isSWF(href)) { | |
300 | + type = 'swf'; | |
301 | + | |
302 | + } else if (href.charAt(0) === '#') { | |
303 | + type = 'inline'; | |
304 | + | |
305 | + } else if (isString(element)) { | |
306 | + type = 'html'; | |
307 | + content = element; | |
308 | + } | |
309 | + } | |
310 | + | |
311 | + // Split url into two pieces with source url and content selector, e.g, | |
312 | + // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" | |
313 | + if (type === 'ajax') { | |
314 | + hrefParts = href.split(/\s+/, 2); | |
315 | + href = hrefParts.shift(); | |
316 | + selector = hrefParts.shift(); | |
317 | + } | |
318 | + } | |
319 | + | |
320 | + if (!content) { | |
321 | + if (type === 'inline') { | |
322 | + if (href) { | |
323 | + content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 | |
324 | + | |
325 | + } else if (obj.isDom) { | |
326 | + content = element; | |
327 | + } | |
328 | + | |
329 | + } else if (type === 'html') { | |
330 | + content = href; | |
331 | + | |
332 | + } else if (!type && !href && obj.isDom) { | |
333 | + type = 'inline'; | |
334 | + content = element; | |
335 | + } | |
336 | + } | |
337 | + | |
338 | + $.extend(obj, { | |
339 | + href : href, | |
340 | + type : type, | |
341 | + content : content, | |
342 | + title : title, | |
343 | + selector : selector | |
344 | + }); | |
345 | + | |
346 | + group[ i ] = obj; | |
347 | + }); | |
348 | + | |
349 | + // Extend the defaults | |
350 | + F.opts = $.extend(true, {}, F.defaults, opts); | |
351 | + | |
352 | + // All options are merged recursive except keys | |
353 | + if (opts.keys !== undefined) { | |
354 | + F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; | |
355 | + } | |
356 | + | |
357 | + F.group = group; | |
358 | + | |
359 | + return F._start(F.opts.index); | |
360 | + }, | |
361 | + | |
362 | + // Cancel image loading or abort ajax request | |
363 | + cancel: function () { | |
364 | + var coming = F.coming; | |
365 | + | |
366 | + if (!coming || false === F.trigger('onCancel')) { | |
367 | + return; | |
368 | + } | |
369 | + | |
370 | + F.hideLoading(); | |
371 | + | |
372 | + if (F.ajaxLoad) { | |
373 | + F.ajaxLoad.abort(); | |
374 | + } | |
375 | + | |
376 | + F.ajaxLoad = null; | |
377 | + | |
378 | + if (F.imgPreload) { | |
379 | + F.imgPreload.onload = F.imgPreload.onerror = null; | |
380 | + } | |
381 | + | |
382 | + if (coming.wrap) { | |
383 | + coming.wrap.stop(true, true).trigger('onReset').remove(); | |
384 | + } | |
385 | + | |
386 | + F.coming = null; | |
387 | + | |
388 | + // If the first item has been canceled, then clear everything | |
389 | + if (!F.current) { | |
390 | + F._afterZoomOut( coming ); | |
391 | + } | |
392 | + }, | |
393 | + | |
394 | + // Start closing animation if is open; remove immediately if opening/closing | |
395 | + close: function (event) { | |
396 | + F.cancel(); | |
397 | + | |
398 | + if (false === F.trigger('beforeClose')) { | |
399 | + return; | |
400 | + } | |
401 | + | |
402 | + F.unbindEvents(); | |
403 | + | |
404 | + if (!F.isActive) { | |
405 | + return; | |
406 | + } | |
407 | + | |
408 | + if (!F.isOpen || event === true) { | |
409 | + $('.fancybox-wrap').stop(true).trigger('onReset').remove(); | |
410 | + | |
411 | + F._afterZoomOut(); | |
412 | + | |
413 | + } else { | |
414 | + F.isOpen = F.isOpened = false; | |
415 | + F.isClosing = true; | |
416 | + | |
417 | + $('.fancybox-item, .fancybox-nav').remove(); | |
418 | + | |
419 | + F.wrap.stop(true, true).removeClass('fancybox-opened'); | |
420 | + | |
421 | + F.transitions[ F.current.closeMethod ](); | |
422 | + } | |
423 | + }, | |
424 | + | |
425 | + // Manage slideshow: | |
426 | + // $.fancybox.play(); - toggle slideshow | |
427 | + // $.fancybox.play( true ); - start | |
428 | + // $.fancybox.play( false ); - stop | |
429 | + play: function ( action ) { | |
430 | + var clear = function () { | |
431 | + clearTimeout(F.player.timer); | |
432 | + }, | |
433 | + set = function () { | |
434 | + clear(); | |
435 | + | |
436 | + if (F.current && F.player.isActive) { | |
437 | + F.player.timer = setTimeout(F.next, F.current.playSpeed); | |
438 | + } | |
439 | + }, | |
440 | + stop = function () { | |
441 | + clear(); | |
442 | + | |
443 | + D.unbind('.player'); | |
444 | + | |
445 | + F.player.isActive = false; | |
446 | + | |
447 | + F.trigger('onPlayEnd'); | |
448 | + }, | |
449 | + start = function () { | |
450 | + if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { | |
451 | + F.player.isActive = true; | |
452 | + | |
453 | + D.bind({ | |
454 | + 'onCancel.player beforeClose.player' : stop, | |
455 | + 'onUpdate.player' : set, | |
456 | + 'beforeLoad.player' : clear | |
457 | + }); | |
458 | + | |
459 | + set(); | |
460 | + | |
461 | + F.trigger('onPlayStart'); | |
462 | + } | |
463 | + }; | |
464 | + | |
465 | + if (action === true || (!F.player.isActive && action !== false)) { | |
466 | + start(); | |
467 | + } else { | |
468 | + stop(); | |
469 | + } | |
470 | + }, | |
471 | + | |
472 | + // Navigate to next gallery item | |
473 | + next: function ( direction ) { | |
474 | + var current = F.current; | |
475 | + | |
476 | + if (current) { | |
477 | + if (!isString(direction)) { | |
478 | + direction = current.direction.next; | |
479 | + } | |
480 | + | |
481 | + F.jumpto(current.index + 1, direction, 'next'); | |
482 | + } | |
483 | + }, | |
484 | + | |
485 | + // Navigate to previous gallery item | |
486 | + prev: function ( direction ) { | |
487 | + var current = F.current; | |
488 | + | |
489 | + if (current) { | |
490 | + if (!isString(direction)) { | |
491 | + direction = current.direction.prev; | |
492 | + } | |
493 | + | |
494 | + F.jumpto(current.index - 1, direction, 'prev'); | |
495 | + } | |
496 | + }, | |
497 | + | |
498 | + // Navigate to gallery item by index | |
499 | + jumpto: function ( index, direction, router ) { | |
500 | + var current = F.current; | |
501 | + | |
502 | + if (!current) { | |
503 | + return; | |
504 | + } | |
505 | + | |
506 | + index = getScalar(index); | |
507 | + | |
508 | + F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; | |
509 | + F.router = router || 'jumpto'; | |
510 | + | |
511 | + if (current.loop) { | |
512 | + if (index < 0) { | |
513 | + index = current.group.length + (index % current.group.length); | |
514 | + } | |
515 | + | |
516 | + index = index % current.group.length; | |
517 | + } | |
518 | + | |
519 | + if (current.group[ index ] !== undefined) { | |
520 | + F.cancel(); | |
521 | + | |
522 | + F._start(index); | |
523 | + } | |
524 | + }, | |
525 | + | |
526 | + // Center inside viewport and toggle position type to fixed or absolute if needed | |
527 | + reposition: function (e, onlyAbsolute) { | |
528 | + var current = F.current, | |
529 | + wrap = current ? current.wrap : null, | |
530 | + pos; | |
531 | + | |
532 | + if (wrap) { | |
533 | + pos = F._getPosition(onlyAbsolute); | |
534 | + | |
535 | + if (e && e.type === 'scroll') { | |
536 | + delete pos.position; | |
537 | + | |
538 | + wrap.stop(true, true).animate(pos, 200); | |
539 | + | |
540 | + } else { | |
541 | + wrap.css(pos); | |
542 | + | |
543 | + current.pos = $.extend({}, current.dim, pos); | |
544 | + } | |
545 | + } | |
546 | + }, | |
547 | + | |
548 | + update: function (e) { | |
549 | + var type = (e && e.type), | |
550 | + anyway = !type || type === 'orientationchange'; | |
551 | + | |
552 | + if (anyway) { | |
553 | + clearTimeout(didUpdate); | |
554 | + | |
555 | + didUpdate = null; | |
556 | + } | |
557 | + | |
558 | + if (!F.isOpen || didUpdate) { | |
559 | + return; | |
560 | + } | |
561 | + | |
562 | + didUpdate = setTimeout(function() { | |
563 | + var current = F.current; | |
564 | + | |
565 | + if (!current || F.isClosing) { | |
566 | + return; | |
567 | + } | |
568 | + | |
569 | + F.wrap.removeClass('fancybox-tmp'); | |
570 | + | |
571 | + if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { | |
572 | + F._setDimension(); | |
573 | + } | |
574 | + | |
575 | + if (!(type === 'scroll' && current.canShrink)) { | |
576 | + F.reposition(e); | |
577 | + } | |
578 | + | |
579 | + F.trigger('onUpdate'); | |
580 | + | |
581 | + didUpdate = null; | |
582 | + | |
583 | + }, (anyway && !isTouch ? 0 : 300)); | |
584 | + }, | |
585 | + | |
586 | + // Shrink content to fit inside viewport or restore if resized | |
587 | + toggle: function ( action ) { | |
588 | + if (F.isOpen) { | |
589 | + F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; | |
590 | + | |
591 | + // Help browser to restore document dimensions | |
592 | + if (isTouch) { | |
593 | + F.wrap.removeAttr('style').addClass('fancybox-tmp'); | |
594 | + | |
595 | + F.trigger('onUpdate'); | |
596 | + } | |
597 | + | |
598 | + F.update(); | |
599 | + } | |
600 | + }, | |
601 | + | |
602 | + hideLoading: function () { | |
603 | + D.unbind('.loading'); | |
604 | + | |
605 | + $('#fancybox-loading').remove(); | |
606 | + }, | |
607 | + | |
608 | + showLoading: function () { | |
609 | + var el, viewport; | |
610 | + | |
611 | + F.hideLoading(); | |
612 | + | |
613 | + el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body'); | |
614 | + | |
615 | + // If user will press the escape-button, the request will be canceled | |
616 | + D.bind('keydown.loading', function(e) { | |
617 | + if ((e.which || e.keyCode) === 27) { | |
618 | + e.preventDefault(); | |
619 | + | |
620 | + F.cancel(); | |
621 | + } | |
622 | + }); | |
623 | + | |
624 | + if (!F.defaults.fixed) { | |
625 | + viewport = F.getViewport(); | |
626 | + | |
627 | + el.css({ | |
628 | + position : 'absolute', | |
629 | + top : (viewport.h * 0.5) + viewport.y, | |
630 | + left : (viewport.w * 0.5) + viewport.x | |
631 | + }); | |
632 | + } | |
633 | + }, | |
634 | + | |
635 | + getViewport: function () { | |
636 | + var locked = (F.current && F.current.locked) || false, | |
637 | + rez = { | |
638 | + x: W.scrollLeft(), | |
639 | + y: W.scrollTop() | |
640 | + }; | |
641 | + | |
642 | + if (locked) { | |
643 | + rez.w = locked[0].clientWidth; | |
644 | + rez.h = locked[0].clientHeight; | |
645 | + | |
646 | + } else { | |
647 | + // See http://bugs.jquery.com/ticket/6724 | |
648 | + rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); | |
649 | + rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); | |
650 | + } | |
651 | + | |
652 | + return rez; | |
653 | + }, | |
654 | + | |
655 | + // Unbind the keyboard / clicking actions | |
656 | + unbindEvents: function () { | |
657 | + if (F.wrap && isQuery(F.wrap)) { | |
658 | + F.wrap.unbind('.fb'); | |
659 | + } | |
660 | + | |
661 | + D.unbind('.fb'); | |
662 | + W.unbind('.fb'); | |
663 | + }, | |
664 | + | |
665 | + bindEvents: function () { | |
666 | + var current = F.current, | |
667 | + keys; | |
668 | + | |
669 | + if (!current) { | |
670 | + return; | |
671 | + } | |
672 | + | |
673 | + // Changing document height on iOS devices triggers a 'resize' event, | |
674 | + // that can change document height... repeating infinitely | |
675 | + W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); | |
676 | + | |
677 | + keys = current.keys; | |
678 | + | |
679 | + if (keys) { | |
680 | + D.bind('keydown.fb', function (e) { | |
681 | + var code = e.which || e.keyCode, | |
682 | + target = e.target || e.srcElement; | |
683 | + | |
684 | + // Skip esc key if loading, because showLoading will cancel preloading | |
685 | + if (code === 27 && F.coming) { | |
686 | + return false; | |
687 | + } | |
688 | + | |
689 | + // Ignore key combinations and key events within form elements | |
690 | + if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { | |
691 | + $.each(keys, function(i, val) { | |
692 | + if (current.group.length > 1 && val[ code ] !== undefined) { | |
693 | + F[ i ]( val[ code ] ); | |
694 | + | |
695 | + e.preventDefault(); | |
696 | + return false; | |
697 | + } | |
698 | + | |
699 | + if ($.inArray(code, val) > -1) { | |
700 | + F[ i ] (); | |
701 | + | |
702 | + e.preventDefault(); | |
703 | + return false; | |
704 | + } | |
705 | + }); | |
706 | + } | |
707 | + }); | |
708 | + } | |
709 | + | |
710 | + if ($.fn.mousewheel && current.mouseWheel) { | |
711 | + F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { | |
712 | + var target = e.target || null, | |
713 | + parent = $(target), | |
714 | + canScroll = false; | |
715 | + | |
716 | + while (parent.length) { | |
717 | + if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { | |
718 | + break; | |
719 | + } | |
720 | + | |
721 | + canScroll = isScrollable( parent[0] ); | |
722 | + parent = $(parent).parent(); | |
723 | + } | |
724 | + | |
725 | + if (delta !== 0 && !canScroll) { | |
726 | + if (F.group.length > 1 && !current.canShrink) { | |
727 | + if (deltaY > 0 || deltaX > 0) { | |
728 | + F.prev( deltaY > 0 ? 'down' : 'left' ); | |
729 | + | |
730 | + } else if (deltaY < 0 || deltaX < 0) { | |
731 | + F.next( deltaY < 0 ? 'up' : 'right' ); | |
732 | + } | |
733 | + | |
734 | + e.preventDefault(); | |
735 | + } | |
736 | + } | |
737 | + }); | |
738 | + } | |
739 | + }, | |
740 | + | |
741 | + trigger: function (event, o) { | |
742 | + var ret, obj = o || F.coming || F.current; | |
743 | + | |
744 | + if (!obj) { | |
745 | + return; | |
746 | + } | |
747 | + | |
748 | + if ($.isFunction( obj[event] )) { | |
749 | + ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); | |
750 | + } | |
751 | + | |
752 | + if (ret === false) { | |
753 | + return false; | |
754 | + } | |
755 | + | |
756 | + if (obj.helpers) { | |
757 | + $.each(obj.helpers, function (helper, opts) { | |
758 | + if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { | |
759 | + F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); | |
760 | + } | |
761 | + }); | |
762 | + } | |
763 | + | |
764 | + D.trigger(event); | |
765 | + }, | |
766 | + | |
767 | + isImage: function (str) { | |
768 | + return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); | |
769 | + }, | |
770 | + | |
771 | + isSWF: function (str) { | |
772 | + return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); | |
773 | + }, | |
774 | + | |
775 | + _start: function (index) { | |
776 | + var coming = {}, | |
777 | + obj, | |
778 | + href, | |
779 | + type, | |
780 | + margin, | |
781 | + padding; | |
782 | + | |
783 | + index = getScalar( index ); | |
784 | + obj = F.group[ index ] || null; | |
785 | + | |
786 | + if (!obj) { | |
787 | + return false; | |
788 | + } | |
789 | + | |
790 | + coming = $.extend(true, {}, F.opts, obj); | |
791 | + | |
792 | + // Convert margin and padding properties to array - top, right, bottom, left | |
793 | + margin = coming.margin; | |
794 | + padding = coming.padding; | |
795 | + | |
796 | + if ($.type(margin) === 'number') { | |
797 | + coming.margin = [margin, margin, margin, margin]; | |
798 | + } | |
799 | + | |
800 | + if ($.type(padding) === 'number') { | |
801 | + coming.padding = [padding, padding, padding, padding]; | |
802 | + } | |
803 | + | |
804 | + // 'modal' propery is just a shortcut | |
805 | + if (coming.modal) { | |
806 | + $.extend(true, coming, { | |
807 | + closeBtn : false, | |
808 | + closeClick : false, | |
809 | + nextClick : false, | |
810 | + arrows : false, | |
811 | + mouseWheel : false, | |
812 | + keys : null, | |
813 | + helpers: { | |
814 | + overlay : { | |
815 | + closeClick : false | |
816 | + } | |
817 | + } | |
818 | + }); | |
819 | + } | |
820 | + | |
821 | + // 'autoSize' property is a shortcut, too | |
822 | + if (coming.autoSize) { | |
823 | + coming.autoWidth = coming.autoHeight = true; | |
824 | + } | |
825 | + | |
826 | + if (coming.width === 'auto') { | |
827 | + coming.autoWidth = true; | |
828 | + } | |
829 | + | |
830 | + if (coming.height === 'auto') { | |
831 | + coming.autoHeight = true; | |
832 | + } | |
833 | + | |
834 | + /* | |
835 | + * Add reference to the group, so it`s possible to access from callbacks, example: | |
836 | + * afterLoad : function() { | |
837 | + * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); | |
838 | + * } | |
839 | + */ | |
840 | + | |
841 | + coming.group = F.group; | |
842 | + coming.index = index; | |
843 | + | |
844 | + // Give a chance for callback or helpers to update coming item (type, title, etc) | |
845 | + F.coming = coming; | |
846 | + | |
847 | + if (false === F.trigger('beforeLoad')) { | |
848 | + F.coming = null; | |
849 | + | |
850 | + return; | |
851 | + } | |
852 | + | |
853 | + type = coming.type; | |
854 | + href = coming.href; | |
855 | + | |
856 | + if (!type) { | |
857 | + F.coming = null; | |
858 | + | |
859 | + //If we can not determine content type then drop silently or display next/prev item if looping through gallery | |
860 | + if (F.current && F.router && F.router !== 'jumpto') { | |
861 | + F.current.index = index; | |
862 | + | |
863 | + return F[ F.router ]( F.direction ); | |
864 | + } | |
865 | + | |
866 | + return false; | |
867 | + } | |
868 | + | |
869 | + F.isActive = true; | |
870 | + | |
871 | + if (type === 'image' || type === 'swf') { | |
872 | + coming.autoHeight = coming.autoWidth = false; | |
873 | + coming.scrolling = 'visible'; | |
874 | + } | |
875 | + | |
876 | + if (type === 'image') { | |
877 | + coming.aspectRatio = true; | |
878 | + } | |
879 | + | |
880 | + if (type === 'iframe' && isTouch) { | |
881 | + coming.scrolling = 'scroll'; | |
882 | + } | |
883 | + | |
884 | + // Build the neccessary markup | |
885 | + coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); | |
886 | + | |
887 | + $.extend(coming, { | |
888 | + skin : $('.fancybox-skin', coming.wrap), | |
889 | + outer : $('.fancybox-outer', coming.wrap), | |
890 | + inner : $('.fancybox-inner', coming.wrap) | |
891 | + }); | |
892 | + | |
893 | + $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { | |
894 | + coming.skin.css('padding' + v, getValue(coming.padding[ i ])); | |
895 | + }); | |
896 | + | |
897 | + F.trigger('onReady'); | |
898 | + | |
899 | + // Check before try to load; 'inline' and 'html' types need content, others - href | |
900 | + if (type === 'inline' || type === 'html') { | |
901 | + if (!coming.content || !coming.content.length) { | |
902 | + return F._error( 'content' ); | |
903 | + } | |
904 | + | |
905 | + } else if (!href) { | |
906 | + return F._error( 'href' ); | |
907 | + } | |
908 | + | |
909 | + if (type === 'image') { | |
910 | + F._loadImage(); | |
911 | + | |
912 | + } else if (type === 'ajax') { | |
913 | + F._loadAjax(); | |
914 | + | |
915 | + } else if (type === 'iframe') { | |
916 | + F._loadIframe(); | |
917 | + | |
918 | + } else { | |
919 | + F._afterLoad(); | |
920 | + } | |
921 | + }, | |
922 | + | |
923 | + _error: function ( type ) { | |
924 | + $.extend(F.coming, { | |
925 | + type : 'html', | |
926 | + autoWidth : true, | |
927 | + autoHeight : true, | |
928 | + minWidth : 0, | |
929 | + minHeight : 0, | |
930 | + scrolling : 'no', | |
931 | + hasError : type, | |
932 | + content : F.coming.tpl.error | |
933 | + }); | |
934 | + | |
935 | + F._afterLoad(); | |
936 | + }, | |
937 | + | |
938 | + _loadImage: function () { | |
939 | + // Reset preload image so it is later possible to check "complete" property | |
940 | + var img = F.imgPreload = new Image(); | |
941 | + | |
942 | + img.onload = function () { | |
943 | + this.onload = this.onerror = null; | |
944 | + | |
945 | + F.coming.width = this.width / F.opts.pixelRatio; | |
946 | + F.coming.height = this.height / F.opts.pixelRatio; | |
947 | + | |
948 | + F._afterLoad(); | |
949 | + }; | |
950 | + | |
951 | + img.onerror = function () { | |
952 | + this.onload = this.onerror = null; | |
953 | + | |
954 | + F._error( 'image' ); | |
955 | + }; | |
956 | + | |
957 | + img.src = F.coming.href; | |
958 | + | |
959 | + if (img.complete !== true) { | |
960 | + F.showLoading(); | |
961 | + } | |
962 | + }, | |
963 | + | |
964 | + _loadAjax: function () { | |
965 | + var coming = F.coming; | |
966 | + | |
967 | + F.showLoading(); | |
968 | + | |
969 | + F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { | |
970 | + url: coming.href, | |
971 | + error: function (jqXHR, textStatus) { | |
972 | + if (F.coming && textStatus !== 'abort') { | |
973 | + F._error( 'ajax', jqXHR ); | |
974 | + | |
975 | + } else { | |
976 | + F.hideLoading(); | |
977 | + } | |
978 | + }, | |
979 | + success: function (data, textStatus) { | |
980 | + if (textStatus === 'success') { | |
981 | + coming.content = data; | |
982 | + | |
983 | + F._afterLoad(); | |
984 | + } | |
985 | + } | |
986 | + })); | |
987 | + }, | |
988 | + | |
989 | + _loadIframe: function() { | |
990 | + var coming = F.coming, | |
991 | + iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) | |
992 | + .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) | |
993 | + .attr('src', coming.href); | |
994 | + | |
995 | + // This helps IE | |
996 | + $(coming.wrap).bind('onReset', function () { | |
997 | + try { | |
998 | + $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); | |
999 | + } catch (e) {} | |
1000 | + }); | |
1001 | + | |
1002 | + if (coming.iframe.preload) { | |
1003 | + F.showLoading(); | |
1004 | + | |
1005 | + iframe.one('load', function() { | |
1006 | + $(this).data('ready', 1); | |
1007 | + | |
1008 | + // iOS will lose scrolling if we resize | |
1009 | + if (!isTouch) { | |
1010 | + $(this).bind('load.fb', F.update); | |
1011 | + } | |
1012 | + | |
1013 | + // Without this trick: | |
1014 | + // - iframe won't scroll on iOS devices | |
1015 | + // - IE7 sometimes displays empty iframe | |
1016 | + $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); | |
1017 | + | |
1018 | + F._afterLoad(); | |
1019 | + }); | |
1020 | + } | |
1021 | + | |
1022 | + coming.content = iframe.appendTo( coming.inner ); | |
1023 | + | |
1024 | + if (!coming.iframe.preload) { | |
1025 | + F._afterLoad(); | |
1026 | + } | |
1027 | + }, | |
1028 | + | |
1029 | + _preloadImages: function() { | |
1030 | + var group = F.group, | |
1031 | + current = F.current, | |
1032 | + len = group.length, | |
1033 | + cnt = current.preload ? Math.min(current.preload, len - 1) : 0, | |
1034 | + item, | |
1035 | + i; | |
1036 | + | |
1037 | + for (i = 1; i <= cnt; i += 1) { | |
1038 | + item = group[ (current.index + i ) % len ]; | |
1039 | + | |
1040 | + if (item.type === 'image' && item.href) { | |
1041 | + new Image().src = item.href; | |
1042 | + } | |
1043 | + } | |
1044 | + }, | |
1045 | + | |
1046 | + _afterLoad: function () { | |
1047 | + var coming = F.coming, | |
1048 | + previous = F.current, | |
1049 | + placeholder = 'fancybox-placeholder', | |
1050 | + current, | |
1051 | + content, | |
1052 | + type, | |
1053 | + scrolling, | |
1054 | + href, | |
1055 | + embed; | |
1056 | + | |
1057 | + F.hideLoading(); | |
1058 | + | |
1059 | + if (!coming || F.isActive === false) { | |
1060 | + return; | |
1061 | + } | |
1062 | + | |
1063 | + if (false === F.trigger('afterLoad', coming, previous)) { | |
1064 | + coming.wrap.stop(true).trigger('onReset').remove(); | |
1065 | + | |
1066 | + F.coming = null; | |
1067 | + | |
1068 | + return; | |
1069 | + } | |
1070 | + | |
1071 | + if (previous) { | |
1072 | + F.trigger('beforeChange', previous); | |
1073 | + | |
1074 | + previous.wrap.stop(true).removeClass('fancybox-opened') | |
1075 | + .find('.fancybox-item, .fancybox-nav') | |
1076 | + .remove(); | |
1077 | + } | |
1078 | + | |
1079 | + F.unbindEvents(); | |
1080 | + | |
1081 | + current = coming; | |
1082 | + content = coming.content; | |
1083 | + type = coming.type; | |
1084 | + scrolling = coming.scrolling; | |
1085 | + | |
1086 | + $.extend(F, { | |
1087 | + wrap : current.wrap, | |
1088 | + skin : current.skin, | |
1089 | + outer : current.outer, | |
1090 | + inner : current.inner, | |
1091 | + current : current, | |
1092 | + previous : previous | |
1093 | + }); | |
1094 | + | |
1095 | + href = current.href; | |
1096 | + | |
1097 | + switch (type) { | |
1098 | + case 'inline': | |
1099 | + case 'ajax': | |
1100 | + case 'html': | |
1101 | + if (current.selector) { | |
1102 | + content = $('<div>').html(content).find(current.selector); | |
1103 | + | |
1104 | + } else if (isQuery(content)) { | |
1105 | + if (!content.data(placeholder)) { | |
1106 | + content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() ); | |
1107 | + } | |
1108 | + | |
1109 | + content = content.show().detach(); | |
1110 | + | |
1111 | + current.wrap.bind('onReset', function () { | |
1112 | + if ($(this).find(content).length) { | |
1113 | + content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); | |
1114 | + } | |
1115 | + }); | |
1116 | + } | |
1117 | + break; | |
1118 | + | |
1119 | + case 'image': | |
1120 | + content = current.tpl.image.replace('{href}', href); | |
1121 | + break; | |
1122 | + | |
1123 | + case 'swf': | |
1124 | + content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>'; | |
1125 | + embed = ''; | |
1126 | + | |
1127 | + $.each(current.swf, function(name, val) { | |
1128 | + content += '<param name="' + name + '" value="' + val + '"></param>'; | |
1129 | + embed += ' ' + name + '="' + val + '"'; | |
1130 | + }); | |
1131 | + | |
1132 | + content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>'; | |
1133 | + break; | |
1134 | + } | |
1135 | + | |
1136 | + if (!(isQuery(content) && content.parent().is(current.inner))) { | |
1137 | + current.inner.append( content ); | |
1138 | + } | |
1139 | + | |
1140 | + // Give a chance for helpers or callbacks to update elements | |
1141 | + F.trigger('beforeShow'); | |
1142 | + | |
1143 | + // Set scrolling before calculating dimensions | |
1144 | + current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); | |
1145 | + | |
1146 | + // Set initial dimensions and start position | |
1147 | + F._setDimension(); | |
1148 | + | |
1149 | + F.reposition(); | |
1150 | + | |
1151 | + F.isOpen = false; | |
1152 | + F.coming = null; | |
1153 | + | |
1154 | + F.bindEvents(); | |
1155 | + | |
1156 | + if (!F.isOpened) { | |
1157 | + $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); | |
1158 | + | |
1159 | + } else if (previous.prevMethod) { | |
1160 | + F.transitions[ previous.prevMethod ](); | |
1161 | + } | |
1162 | + | |
1163 | + F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); | |
1164 | + | |
1165 | + F._preloadImages(); | |
1166 | + }, | |
1167 | + | |
1168 | + _setDimension: function () { | |
1169 | + var viewport = F.getViewport(), | |
1170 | + steps = 0, | |
1171 | + canShrink = false, | |
1172 | + canExpand = false, | |
1173 | + wrap = F.wrap, | |
1174 | + skin = F.skin, | |
1175 | + inner = F.inner, | |
1176 | + current = F.current, | |
1177 | + width = current.width, | |
1178 | + height = current.height, | |
1179 | + minWidth = current.minWidth, | |
1180 | + minHeight = current.minHeight, | |
1181 | + maxWidth = current.maxWidth, | |
1182 | + maxHeight = current.maxHeight, | |
1183 | + scrolling = current.scrolling, | |
1184 | + scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, | |
1185 | + margin = current.margin, | |
1186 | + wMargin = getScalar(margin[1] + margin[3]), | |
1187 | + hMargin = getScalar(margin[0] + margin[2]), | |
1188 | + wPadding, | |
1189 | + hPadding, | |
1190 | + wSpace, | |
1191 | + hSpace, | |
1192 | + origWidth, | |
1193 | + origHeight, | |
1194 | + origMaxWidth, | |
1195 | + origMaxHeight, | |
1196 | + ratio, | |
1197 | + width_, | |
1198 | + height_, | |
1199 | + maxWidth_, | |
1200 | + maxHeight_, | |
1201 | + iframe, | |
1202 | + body; | |
1203 | + | |
1204 | + // Reset dimensions so we could re-check actual size | |
1205 | + wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); | |
1206 | + | |
1207 | + wPadding = getScalar(skin.outerWidth(true) - skin.width()); | |
1208 | + hPadding = getScalar(skin.outerHeight(true) - skin.height()); | |
1209 | + | |
1210 | + // Any space between content and viewport (margin, padding, border, title) | |
1211 | + wSpace = wMargin + wPadding; | |
1212 | + hSpace = hMargin + hPadding; | |
1213 | + | |
1214 | + origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; | |
1215 | + origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; | |
1216 | + | |
1217 | + if (current.type === 'iframe') { | |
1218 | + iframe = current.content; | |
1219 | + | |
1220 | + if (current.autoHeight && iframe.data('ready') === 1) { | |
1221 | + try { | |
1222 | + if (iframe[0].contentWindow.document.location) { | |
1223 | + inner.width( origWidth ).height(9999); | |
1224 | + | |
1225 | + body = iframe.contents().find('body'); | |
1226 | + | |
1227 | + if (scrollOut) { | |
1228 | + body.css('overflow-x', 'hidden'); | |
1229 | + } | |
1230 | + | |
1231 | + origHeight = body.outerHeight(true); | |
1232 | + } | |
1233 | + | |
1234 | + } catch (e) {} | |
1235 | + } | |
1236 | + | |
1237 | + } else if (current.autoWidth || current.autoHeight) { | |
1238 | + inner.addClass( 'fancybox-tmp' ); | |
1239 | + | |
1240 | + // Set width or height in case we need to calculate only one dimension | |
1241 | + if (!current.autoWidth) { | |
1242 | + inner.width( origWidth ); | |
1243 | + } | |
1244 | + | |
1245 | + if (!current.autoHeight) { | |
1246 | + inner.height( origHeight ); | |
1247 | + } | |
1248 | + | |
1249 | + if (current.autoWidth) { | |
1250 | + origWidth = inner.width(); | |
1251 | + } | |
1252 | + | |
1253 | + if (current.autoHeight) { | |
1254 | + origHeight = inner.height(); | |
1255 | + } | |
1256 | + | |
1257 | + inner.removeClass( 'fancybox-tmp' ); | |
1258 | + } | |
1259 | + | |
1260 | + width = getScalar( origWidth ); | |
1261 | + height = getScalar( origHeight ); | |
1262 | + | |
1263 | + ratio = origWidth / origHeight; | |
1264 | + | |
1265 | + // Calculations for the content | |
1266 | + minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); | |
1267 | + maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); | |
1268 | + | |
1269 | + minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); | |
1270 | + maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); | |
1271 | + | |
1272 | + // These will be used to determine if wrap can fit in the viewport | |
1273 | + origMaxWidth = maxWidth; | |
1274 | + origMaxHeight = maxHeight; | |
1275 | + | |
1276 | + if (current.fitToView) { | |
1277 | + maxWidth = Math.min(viewport.w - wSpace, maxWidth); | |
1278 | + maxHeight = Math.min(viewport.h - hSpace, maxHeight); | |
1279 | + } | |
1280 | + | |
1281 | + maxWidth_ = viewport.w - wMargin; | |
1282 | + maxHeight_ = viewport.h - hMargin; | |
1283 | + | |
1284 | + if (current.aspectRatio) { | |
1285 | + if (width > maxWidth) { | |
1286 | + width = maxWidth; | |
1287 | + height = getScalar(width / ratio); | |
1288 | + } | |
1289 | + | |
1290 | + if (height > maxHeight) { | |
1291 | + height = maxHeight; | |
1292 | + width = getScalar(height * ratio); | |
1293 | + } | |
1294 | + | |
1295 | + if (width < minWidth) { | |
1296 | + width = minWidth; | |
1297 | + height = getScalar(width / ratio); | |
1298 | + } | |
1299 | + | |
1300 | + if (height < minHeight) { | |
1301 | + height = minHeight; | |
1302 | + width = getScalar(height * ratio); | |
1303 | + } | |
1304 | + | |
1305 | + } else { | |
1306 | + width = Math.max(minWidth, Math.min(width, maxWidth)); | |
1307 | + | |
1308 | + if (current.autoHeight && current.type !== 'iframe') { | |
1309 | + inner.width( width ); | |
1310 | + | |
1311 | + height = inner.height(); | |
1312 | + } | |
1313 | + | |
1314 | + height = Math.max(minHeight, Math.min(height, maxHeight)); | |
1315 | + } | |
1316 | + | |
1317 | + // Try to fit inside viewport (including the title) | |
1318 | + if (current.fitToView) { | |
1319 | + inner.width( width ).height( height ); | |
1320 | + | |
1321 | + wrap.width( width + wPadding ); | |
1322 | + | |
1323 | + // Real wrap dimensions | |
1324 | + width_ = wrap.width(); | |
1325 | + height_ = wrap.height(); | |
1326 | + | |
1327 | + if (current.aspectRatio) { | |
1328 | + while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { | |
1329 | + if (steps++ > 19) { | |
1330 | + break; | |
1331 | + } | |
1332 | + | |
1333 | + height = Math.max(minHeight, Math.min(maxHeight, height - 10)); | |
1334 | + width = getScalar(height * ratio); | |
1335 | + | |
1336 | + if (width < minWidth) { | |
1337 | + width = minWidth; | |
1338 | + height = getScalar(width / ratio); | |
1339 | + } | |
1340 | + | |
1341 | + if (width > maxWidth) { | |
1342 | + width = maxWidth; | |
1343 | + height = getScalar(width / ratio); | |
1344 | + } | |
1345 | + | |
1346 | + inner.width( width ).height( height ); | |
1347 | + | |
1348 | + wrap.width( width + wPadding ); | |
1349 | + | |
1350 | + width_ = wrap.width(); | |
1351 | + height_ = wrap.height(); | |
1352 | + } | |
1353 | + | |
1354 | + } else { | |
1355 | + width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); | |
1356 | + height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); | |
1357 | + } | |
1358 | + } | |
1359 | + | |
1360 | + if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { | |
1361 | + width += scrollOut; | |
1362 | + } | |
1363 | + | |
1364 | + inner.width( width ).height( height ); | |
1365 | + | |
1366 | + wrap.width( width + wPadding ); | |
1367 | + | |
1368 | + width_ = wrap.width(); | |
1369 | + height_ = wrap.height(); | |
1370 | + | |
1371 | + canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; | |
1372 | + canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); | |
1373 | + | |
1374 | + $.extend(current, { | |
1375 | + dim : { | |
1376 | + width : getValue( width_ ), | |
1377 | + height : getValue( height_ ) | |
1378 | + }, | |
1379 | + origWidth : origWidth, | |
1380 | + origHeight : origHeight, | |
1381 | + canShrink : canShrink, | |
1382 | + canExpand : canExpand, | |
1383 | + wPadding : wPadding, | |
1384 | + hPadding : hPadding, | |
1385 | + wrapSpace : height_ - skin.outerHeight(true), | |
1386 | + skinSpace : skin.height() - height | |
1387 | + }); | |
1388 | + | |
1389 | + if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { | |
1390 | + inner.height('auto'); | |
1391 | + } | |
1392 | + }, | |
1393 | + | |
1394 | + _getPosition: function (onlyAbsolute) { | |
1395 | + var current = F.current, | |
1396 | + viewport = F.getViewport(), | |
1397 | + margin = current.margin, | |
1398 | + width = F.wrap.width() + margin[1] + margin[3], | |
1399 | + height = F.wrap.height() + margin[0] + margin[2], | |
1400 | + rez = { | |
1401 | + position: 'absolute', | |
1402 | + top : margin[0], | |
1403 | + left : margin[3] | |
1404 | + }; | |
1405 | + | |
1406 | + if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { | |
1407 | + rez.position = 'fixed'; | |
1408 | + | |
1409 | + } else if (!current.locked) { | |
1410 | + rez.top += viewport.y; | |
1411 | + rez.left += viewport.x; | |
1412 | + } | |
1413 | + | |
1414 | + rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); | |
1415 | + rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); | |
1416 | + | |
1417 | + return rez; | |
1418 | + }, | |
1419 | + | |
1420 | + _afterZoomIn: function () { | |
1421 | + var current = F.current; | |
1422 | + | |
1423 | + if (!current) { | |
1424 | + return; | |
1425 | + } | |
1426 | + | |
1427 | + F.isOpen = F.isOpened = true; | |
1428 | + | |
1429 | + F.wrap.css('overflow', 'visible').addClass('fancybox-opened'); | |
1430 | + | |
1431 | + F.update(); | |
1432 | + | |
1433 | + // Assign a click event | |
1434 | + if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { | |
1435 | + F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { | |
1436 | + if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { | |
1437 | + e.preventDefault(); | |
1438 | + | |
1439 | + F[ current.closeClick ? 'close' : 'next' ](); | |
1440 | + } | |
1441 | + }); | |
1442 | + } | |
1443 | + | |
1444 | + // Create a close button | |
1445 | + if (current.closeBtn) { | |
1446 | + $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { | |
1447 | + e.preventDefault(); | |
1448 | + | |
1449 | + F.close(); | |
1450 | + }); | |
1451 | + } | |
1452 | + | |
1453 | + // Create navigation arrows | |
1454 | + if (current.arrows && F.group.length > 1) { | |
1455 | + if (current.loop || current.index > 0) { | |
1456 | + $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); | |
1457 | + } | |
1458 | + | |
1459 | + if (current.loop || current.index < F.group.length - 1) { | |
1460 | + $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); | |
1461 | + } | |
1462 | + } | |
1463 | + | |
1464 | + F.trigger('afterShow'); | |
1465 | + | |
1466 | + // Stop the slideshow if this is the last item | |
1467 | + if (!current.loop && current.index === current.group.length - 1) { | |
1468 | + F.play( false ); | |
1469 | + | |
1470 | + } else if (F.opts.autoPlay && !F.player.isActive) { | |
1471 | + F.opts.autoPlay = false; | |
1472 | + | |
1473 | + F.play(); | |
1474 | + } | |
1475 | + }, | |
1476 | + | |
1477 | + _afterZoomOut: function ( obj ) { | |
1478 | + obj = obj || F.current; | |
1479 | + | |
1480 | + $('.fancybox-wrap').trigger('onReset').remove(); | |
1481 | + | |
1482 | + $.extend(F, { | |
1483 | + group : {}, | |
1484 | + opts : {}, | |
1485 | + router : false, | |
1486 | + current : null, | |
1487 | + isActive : false, | |
1488 | + isOpened : false, | |
1489 | + isOpen : false, | |
1490 | + isClosing : false, | |
1491 | + wrap : null, | |
1492 | + skin : null, | |
1493 | + outer : null, | |
1494 | + inner : null | |
1495 | + }); | |
1496 | + | |
1497 | + F.trigger('afterClose', obj); | |
1498 | + } | |
1499 | + }); | |
1500 | + | |
1501 | + /* | |
1502 | + * Default transitions | |
1503 | + */ | |
1504 | + | |
1505 | + F.transitions = { | |
1506 | + getOrigPosition: function () { | |
1507 | + var current = F.current, | |
1508 | + element = current.element, | |
1509 | + orig = current.orig, | |
1510 | + pos = {}, | |
1511 | + width = 50, | |
1512 | + height = 50, | |
1513 | + hPadding = current.hPadding, | |
1514 | + wPadding = current.wPadding, | |
1515 | + viewport = F.getViewport(); | |
1516 | + | |
1517 | + if (!orig && current.isDom && element.is(':visible')) { | |
1518 | + orig = element.find('img:first'); | |
1519 | + | |
1520 | + if (!orig.length) { | |
1521 | + orig = element; | |
1522 | + } | |
1523 | + } | |
1524 | + | |
1525 | + if (isQuery(orig)) { | |
1526 | + pos = orig.offset(); | |
1527 | + | |
1528 | + if (orig.is('img')) { | |
1529 | + width = orig.outerWidth(); | |
1530 | + height = orig.outerHeight(); | |
1531 | + } | |
1532 | + | |
1533 | + } else { | |
1534 | + pos.top = viewport.y + (viewport.h - height) * current.topRatio; | |
1535 | + pos.left = viewport.x + (viewport.w - width) * current.leftRatio; | |
1536 | + } | |
1537 | + | |
1538 | + if (F.wrap.css('position') === 'fixed' || current.locked) { | |
1539 | + pos.top -= viewport.y; | |
1540 | + pos.left -= viewport.x; | |
1541 | + } | |
1542 | + | |
1543 | + pos = { | |
1544 | + top : getValue(pos.top - hPadding * current.topRatio), | |
1545 | + left : getValue(pos.left - wPadding * current.leftRatio), | |
1546 | + width : getValue(width + wPadding), | |
1547 | + height : getValue(height + hPadding) | |
1548 | + }; | |
1549 | + | |
1550 | + return pos; | |
1551 | + }, | |
1552 | + | |
1553 | + step: function (now, fx) { | |
1554 | + var ratio, | |
1555 | + padding, | |
1556 | + value, | |
1557 | + prop = fx.prop, | |
1558 | + current = F.current, | |
1559 | + wrapSpace = current.wrapSpace, | |
1560 | + skinSpace = current.skinSpace; | |
1561 | + | |
1562 | + if (prop === 'width' || prop === 'height') { | |
1563 | + ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); | |
1564 | + | |
1565 | + if (F.isClosing) { | |
1566 | + ratio = 1 - ratio; | |
1567 | + } | |
1568 | + | |
1569 | + padding = prop === 'width' ? current.wPadding : current.hPadding; | |
1570 | + value = now - padding; | |
1571 | + | |
1572 | + F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); | |
1573 | + F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); | |
1574 | + } | |
1575 | + }, | |
1576 | + | |
1577 | + zoomIn: function () { | |
1578 | + var current = F.current, | |
1579 | + startPos = current.pos, | |
1580 | + effect = current.openEffect, | |
1581 | + elastic = effect === 'elastic', | |
1582 | + endPos = $.extend({opacity : 1}, startPos); | |
1583 | + | |
1584 | + // Remove "position" property that breaks older IE | |
1585 | + delete endPos.position; | |
1586 | + | |
1587 | + if (elastic) { | |
1588 | + startPos = this.getOrigPosition(); | |
1589 | + | |
1590 | + if (current.openOpacity) { | |
1591 | + startPos.opacity = 0.1; | |
1592 | + } | |
1593 | + | |
1594 | + } else if (effect === 'fade') { | |
1595 | + startPos.opacity = 0.1; | |
1596 | + } | |
1597 | + | |
1598 | + F.wrap.css(startPos).animate(endPos, { | |
1599 | + duration : effect === 'none' ? 0 : current.openSpeed, | |
1600 | + easing : current.openEasing, | |
1601 | + step : elastic ? this.step : null, | |
1602 | + complete : F._afterZoomIn | |
1603 | + }); | |
1604 | + }, | |
1605 | + | |
1606 | + zoomOut: function () { | |
1607 | + var current = F.current, | |
1608 | + effect = current.closeEffect, | |
1609 | + elastic = effect === 'elastic', | |
1610 | + endPos = {opacity : 0.1}; | |
1611 | + | |
1612 | + if (elastic) { | |
1613 | + endPos = this.getOrigPosition(); | |
1614 | + | |
1615 | + if (current.closeOpacity) { | |
1616 | + endPos.opacity = 0.1; | |
1617 | + } | |
1618 | + } | |
1619 | + | |
1620 | + F.wrap.animate(endPos, { | |
1621 | + duration : effect === 'none' ? 0 : current.closeSpeed, | |
1622 | + easing : current.closeEasing, | |
1623 | + step : elastic ? this.step : null, | |
1624 | + complete : F._afterZoomOut | |
1625 | + }); | |
1626 | + }, | |
1627 | + | |
1628 | + changeIn: function () { | |
1629 | + var current = F.current, | |
1630 | + effect = current.nextEffect, | |
1631 | + startPos = current.pos, | |
1632 | + endPos = { opacity : 1 }, | |
1633 | + direction = F.direction, | |
1634 | + distance = 200, | |
1635 | + field; | |
1636 | + | |
1637 | + startPos.opacity = 0.1; | |
1638 | + | |
1639 | + if (effect === 'elastic') { | |
1640 | + field = direction === 'down' || direction === 'up' ? 'top' : 'left'; | |
1641 | + | |
1642 | + if (direction === 'down' || direction === 'right') { | |
1643 | + startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); | |
1644 | + endPos[ field ] = '+=' + distance + 'px'; | |
1645 | + | |
1646 | + } else { | |
1647 | + startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); | |
1648 | + endPos[ field ] = '-=' + distance + 'px'; | |
1649 | + } | |
1650 | + } | |
1651 | + | |
1652 | + // Workaround for http://bugs.jquery.com/ticket/12273 | |
1653 | + if (effect === 'none') { | |
1654 | + F._afterZoomIn(); | |
1655 | + | |
1656 | + } else { | |
1657 | + F.wrap.css(startPos).animate(endPos, { | |
1658 | + duration : current.nextSpeed, | |
1659 | + easing : current.nextEasing, | |
1660 | + complete : F._afterZoomIn | |
1661 | + }); | |
1662 | + } | |
1663 | + }, | |
1664 | + | |
1665 | + changeOut: function () { | |
1666 | + var previous = F.previous, | |
1667 | + effect = previous.prevEffect, | |
1668 | + endPos = { opacity : 0.1 }, | |
1669 | + direction = F.direction, | |
1670 | + distance = 200; | |
1671 | + | |
1672 | + if (effect === 'elastic') { | |
1673 | + endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; | |
1674 | + } | |
1675 | + | |
1676 | + previous.wrap.animate(endPos, { | |
1677 | + duration : effect === 'none' ? 0 : previous.prevSpeed, | |
1678 | + easing : previous.prevEasing, | |
1679 | + complete : function () { | |
1680 | + $(this).trigger('onReset').remove(); | |
1681 | + } | |
1682 | + }); | |
1683 | + } | |
1684 | + }; | |
1685 | + | |
1686 | + /* | |
1687 | + * Overlay helper | |
1688 | + */ | |
1689 | + | |
1690 | + F.helpers.overlay = { | |
1691 | + defaults : { | |
1692 | + closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay | |
1693 | + speedOut : 200, // duration of fadeOut animation | |
1694 | + showEarly : true, // indicates if should be opened immediately or wait until the content is ready | |
1695 | + css : {}, // custom CSS properties | |
1696 | + locked : !isTouch, // if true, the content will be locked into overlay | |
1697 | + fixed : true // if false, the overlay CSS position property will not be set to "fixed" | |
1698 | + }, | |
1699 | + | |
1700 | + overlay : null, // current handle | |
1701 | + fixed : false, // indicates if the overlay has position "fixed" | |
1702 | + el : $('html'), // element that contains "the lock" | |
1703 | + | |
1704 | + // Public methods | |
1705 | + create : function(opts) { | |
1706 | + opts = $.extend({}, this.defaults, opts); | |
1707 | + | |
1708 | + if (this.overlay) { | |
1709 | + this.close(); | |
1710 | + } | |
1711 | + | |
1712 | + this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent ); | |
1713 | + this.fixed = false; | |
1714 | + | |
1715 | + if (opts.fixed && F.defaults.fixed) { | |
1716 | + this.overlay.addClass('fancybox-overlay-fixed'); | |
1717 | + | |
1718 | + this.fixed = true; | |
1719 | + } | |
1720 | + }, | |
1721 | + | |
1722 | + open : function(opts) { | |
1723 | + var that = this; | |
1724 | + | |
1725 | + opts = $.extend({}, this.defaults, opts); | |
1726 | + | |
1727 | + if (this.overlay) { | |
1728 | + this.overlay.unbind('.overlay').width('auto').height('auto'); | |
1729 | + | |
1730 | + } else { | |
1731 | + this.create(opts); | |
1732 | + } | |
1733 | + | |
1734 | + if (!this.fixed) { | |
1735 | + W.bind('resize.overlay', $.proxy( this.update, this) ); | |
1736 | + | |
1737 | + this.update(); | |
1738 | + } | |
1739 | + | |
1740 | + if (opts.closeClick) { | |
1741 | + this.overlay.bind('click.overlay', function(e) { | |
1742 | + if ($(e.target).hasClass('fancybox-overlay')) { | |
1743 | + if (F.isActive) { | |
1744 | + F.close(); | |
1745 | + } else { | |
1746 | + that.close(); | |
1747 | + } | |
1748 | + | |
1749 | + return false; | |
1750 | + } | |
1751 | + }); | |
1752 | + } | |
1753 | + | |
1754 | + this.overlay.css( opts.css ).show(); | |
1755 | + }, | |
1756 | + | |
1757 | + close : function() { | |
1758 | + var scrollV, scrollH; | |
1759 | + | |
1760 | + W.unbind('resize.overlay'); | |
1761 | + | |
1762 | + if (this.el.hasClass('fancybox-lock')) { | |
1763 | + $('.fancybox-margin').removeClass('fancybox-margin'); | |
1764 | + | |
1765 | + scrollV = W.scrollTop(); | |
1766 | + scrollH = W.scrollLeft(); | |
1767 | + | |
1768 | + this.el.removeClass('fancybox-lock'); | |
1769 | + | |
1770 | + W.scrollTop( scrollV ).scrollLeft( scrollH ); | |
1771 | + } | |
1772 | + | |
1773 | + $('.fancybox-overlay').remove().hide(); | |
1774 | + | |
1775 | + $.extend(this, { | |
1776 | + overlay : null, | |
1777 | + fixed : false | |
1778 | + }); | |
1779 | + }, | |
1780 | + | |
1781 | + // Private, callbacks | |
1782 | + | |
1783 | + update : function () { | |
1784 | + var width = '100%', offsetWidth; | |
1785 | + | |
1786 | + // Reset width/height so it will not mess | |
1787 | + this.overlay.width(width).height('100%'); | |
1788 | + | |
1789 | + // jQuery does not return reliable result for IE | |
1790 | + if (IE) { | |
1791 | + offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); | |
1792 | + | |
1793 | + if (D.width() > offsetWidth) { | |
1794 | + width = D.width(); | |
1795 | + } | |
1796 | + | |
1797 | + } else if (D.width() > W.width()) { | |
1798 | + width = D.width(); | |
1799 | + } | |
1800 | + | |
1801 | + this.overlay.width(width).height(D.height()); | |
1802 | + }, | |
1803 | + | |
1804 | + // This is where we can manipulate DOM, because later it would cause iframes to reload | |
1805 | + onReady : function (opts, obj) { | |
1806 | + var overlay = this.overlay; | |
1807 | + | |
1808 | + $('.fancybox-overlay').stop(true, true); | |
1809 | + | |
1810 | + if (!overlay) { | |
1811 | + this.create(opts); | |
1812 | + } | |
1813 | + | |
1814 | + if (opts.locked && this.fixed && obj.fixed) { | |
1815 | + if (!overlay) { | |
1816 | + this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; | |
1817 | + } | |
1818 | + | |
1819 | + obj.locked = this.overlay.append( obj.wrap ); | |
1820 | + obj.fixed = false; | |
1821 | + } | |
1822 | + | |
1823 | + if (opts.showEarly === true) { | |
1824 | + this.beforeShow.apply(this, arguments); | |
1825 | + } | |
1826 | + }, | |
1827 | + | |
1828 | + beforeShow : function(opts, obj) { | |
1829 | + var scrollV, scrollH; | |
1830 | + | |
1831 | + if (obj.locked) { | |
1832 | + if (this.margin !== false) { | |
1833 | + $('*').filter(function(){ | |
1834 | + return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); | |
1835 | + }).addClass('fancybox-margin'); | |
1836 | + | |
1837 | + this.el.addClass('fancybox-margin'); | |
1838 | + } | |
1839 | + | |
1840 | + scrollV = W.scrollTop(); | |
1841 | + scrollH = W.scrollLeft(); | |
1842 | + | |
1843 | + this.el.addClass('fancybox-lock'); | |
1844 | + | |
1845 | + W.scrollTop( scrollV ).scrollLeft( scrollH ); | |
1846 | + } | |
1847 | + | |
1848 | + this.open(opts); | |
1849 | + }, | |
1850 | + | |
1851 | + onUpdate : function() { | |
1852 | + if (!this.fixed) { | |
1853 | + this.update(); | |
1854 | + } | |
1855 | + }, | |
1856 | + | |
1857 | + afterClose: function (opts) { | |
1858 | + // Remove overlay if exists and fancyBox is not opening | |
1859 | + // (e.g., it is not being open using afterClose callback) | |
1860 | + //if (this.overlay && !F.isActive) { | |
1861 | + if (this.overlay && !F.coming) { | |
1862 | + this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); | |
1863 | + } | |
1864 | + } | |
1865 | + }; | |
1866 | + | |
1867 | + /* | |
1868 | + * Title helper | |
1869 | + */ | |
1870 | + | |
1871 | + F.helpers.title = { | |
1872 | + defaults : { | |
1873 | + type : 'float', // 'float', 'inside', 'outside' or 'over', | |
1874 | + position : 'bottom' // 'top' or 'bottom' | |
1875 | + }, | |
1876 | + | |
1877 | + beforeShow: function (opts) { | |
1878 | + var current = F.current, | |
1879 | + text = current.title, | |
1880 | + type = opts.type, | |
1881 | + title, | |
1882 | + target; | |
1883 | + | |
1884 | + if ($.isFunction(text)) { | |
1885 | + text = text.call(current.element, current); | |
1886 | + } | |
1887 | + | |
1888 | + if (!isString(text) || $.trim(text) === '') { | |
1889 | + return; | |
1890 | + } | |
1891 | + | |
1892 | + title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">' + text + '</div>'); | |
1893 | + | |
1894 | + switch (type) { | |
1895 | + case 'inside': | |
1896 | + target = F.skin; | |
1897 | + break; | |
1898 | + | |
1899 | + case 'outside': | |
1900 | + target = F.wrap; | |
1901 | + break; | |
1902 | + | |
1903 | + case 'over': | |
1904 | + target = F.inner; | |
1905 | + break; | |
1906 | + | |
1907 | + default: // 'float' | |
1908 | + target = F.skin; | |
1909 | + | |
1910 | + title.appendTo('body'); | |
1911 | + | |
1912 | + if (IE) { | |
1913 | + title.width( title.width() ); | |
1914 | + } | |
1915 | + | |
1916 | + title.wrapInner('<span class="child"></span>'); | |
1917 | + | |
1918 | + //Increase bottom margin so this title will also fit into viewport | |
1919 | + F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); | |
1920 | + break; | |
1921 | + } | |
1922 | + | |
1923 | + title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); | |
1924 | + } | |
1925 | + }; | |
1926 | + | |
1927 | + // jQuery plugin initialization | |
1928 | + $.fn.fancybox = function (options) { | |
1929 | + var index, | |
1930 | + that = $(this), | |
1931 | + selector = this.selector || '', | |
1932 | + run = function(e) { | |
1933 | + var what = $(this).blur(), idx = index, relType, relVal; | |
1934 | + | |
1935 | + if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { | |
1936 | + relType = options.groupAttr || 'data-fancybox-group'; | |
1937 | + relVal = what.attr(relType); | |
1938 | + | |
1939 | + if (!relVal) { | |
1940 | + relType = 'rel'; | |
1941 | + relVal = what.get(0)[ relType ]; | |
1942 | + } | |
1943 | + | |
1944 | + if (relVal && relVal !== '' && relVal !== 'nofollow') { | |
1945 | + what = selector.length ? $(selector) : that; | |
1946 | + what = what.filter('[' + relType + '="' + relVal + '"]'); | |
1947 | + idx = what.index(this); | |
1948 | + } | |
1949 | + | |
1950 | + options.index = idx; | |
1951 | + | |
1952 | + // Stop an event from bubbling if everything is fine | |
1953 | + if (F.open(what, options) !== false) { | |
1954 | + e.preventDefault(); | |
1955 | + } | |
1956 | + } | |
1957 | + }; | |
1958 | + | |
1959 | + options = options || {}; | |
1960 | + index = options.index || 0; | |
1961 | + | |
1962 | + if (!selector || options.live === false) { | |
1963 | + that.unbind('click.fb-start').bind('click.fb-start', run); | |
1964 | + | |
1965 | + } else { | |
1966 | + D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); | |
1967 | + } | |
1968 | + | |
1969 | + this.filter('[data-fancybox-start=1]').trigger('click'); | |
1970 | + | |
1971 | + return this; | |
1972 | + }; | |
1973 | + | |
1974 | + // Tests that need a body at doc ready | |
1975 | + D.ready(function() { | |
1976 | + var w1, w2; | |
1977 | + | |
1978 | + if ( $.scrollbarWidth === undefined ) { | |
1979 | + // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth | |
1980 | + $.scrollbarWidth = function() { | |
1981 | + var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'), | |
1982 | + child = parent.children(), | |
1983 | + width = child.innerWidth() - child.height( 99 ).innerWidth(); | |
1984 | + | |
1985 | + parent.remove(); | |
1986 | + | |
1987 | + return width; | |
1988 | + }; | |
1989 | + } | |
1990 | + | |
1991 | + if ( $.support.fixedPosition === undefined ) { | |
1992 | + $.support.fixedPosition = (function() { | |
1993 | + var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'), | |
1994 | + fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); | |
1995 | + | |
1996 | + elem.remove(); | |
1997 | + | |
1998 | + return fixed; | |
1999 | + }()); | |
2000 | + } | |
2001 | + | |
2002 | + $.extend(F.defaults, { | |
2003 | + scrollbarWidth : $.scrollbarWidth(), | |
2004 | + fixed : $.support.fixedPosition, | |
2005 | + parent : $('body') | |
2006 | + }); | |
2007 | + | |
2008 | + //Get real width of page scroll-bar | |
2009 | + w1 = $(window).width(); | |
2010 | + | |
2011 | + H.addClass('fancybox-lock-test'); | |
2012 | + | |
2013 | + w2 = $(window).width(); | |
2014 | + | |
2015 | + H.removeClass('fancybox-lock-test'); | |
2016 | + | |
2017 | + $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head"); | |
2018 | + }); | |
2019 | + | |
2020 | +}(window, document, jQuery)); | |
0 | 2021 | \ No newline at end of file | ... | ... |
css/fancybox/jquery.fancybox.pack.js
0 → 100644
1 | +++ a/css/fancybox/jquery.fancybox.pack.js | |
1 | +/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ | |
2 | +(function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0<a.indexOf("%")},m=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return m(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20, | |
3 | +width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!t,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"}, | |
4 | +keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+ | |
5 | +(J?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, | |
6 | +openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, | |
7 | +isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=u(a)?f(a).get():[a]),f.each(a,function(e,c){var l={},g,h,k,n,m;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),u(c)?(l={href:c.data("fancybox-href")||c.attr("href"),title:f("<div/>").text(c.data("fancybox-title")||c.attr("title")).html(),isDom:!0,element:c}, | |
8 | +f.metadata&&f.extend(!0,l,c.metadata())):l=c);g=d.href||l.href||(r(c)?c:null);h=d.title!==w?d.title:l.title||"";n=(k=d.content||l.content)?"html":d.type||l.type;!n&&l.isDom&&(n=c.data("fancybox-type"),n||(n=(n=c.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(c)&&(n="html",k=c)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));k||("inline"===n?g?k=f(r(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):l.isDom&&(k=c): | |
9 | +"html"===n?k=g:n||g||!l.isDom||(n="inline",k=c));f.extend(l,{href:g,type:n,content:k,title:h,selector:m});a[e]=l}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==w&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(), | |
10 | +b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&& | |
11 | +(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index<b.group.length-1)&&(b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")):c()},next:function(a){var d=b.current;d&&(r(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d= | |
12 | +b.current;d&&(r(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=m(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==w&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,l;c&&(l=b._getPosition(d),a&&"scroll"===a.type?(delete l.position,c.stop(!0,!0).animate(l,200)):(c.css(l),e.pos=f.extend({},e.dim,l)))}, | |
13 | +update:function(a){var d=a&&a.originalEvent&&a.originalEvent.type,e=!d||"orientationchange"===d;e&&(clearTimeout(C),C=null);b.isOpen&&!C&&(C=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),C=null)},e&&!t?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,t&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), | |
14 | +b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}));b.trigger("onLoading")},getViewport:function(){var a=b.current&& | |
15 | +b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=t&&s.innerWidth?s.innerWidth:q.width(),d.h=t&&s.innerHeight?s.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&u(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(t?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c= | |
16 | +e.which||e.keyCode,l=e.target||e.srcElement;if(27===c&&b.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||l&&(l.type||f(l).is("[contenteditable]"))||f.each(d,function(d,l){if(1<a.group.length&&l[c]!==w)return b[d](l[c]),e.preventDefault(),!1;if(-1<f.inArray(c,l))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,l,g){for(var h=f(d.target||null),k=!1;h.length&&!(k||h.is(".fancybox-skin")||h.is(".fancybox-wrap"));)k=h[0]&&!(h[0].style.overflow&& | |
17 | +"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();0!==c&&!k&&1<b.group.length&&!a.canShrink&&(0<g||0<l?b.prev(0<g?"down":"left"):(0>g||0>l)&&b.next(0>g?"up":"right"),d.preventDefault())}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&& | |
18 | +b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=m(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c, | |
19 | +c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== | |
20 | +c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&t&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(t?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady"); | |
21 | +if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= | |
22 | +this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, | |
23 | +d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",t?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);t||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload|| | |
24 | +b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,l,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); | |
25 | +b.unbindEvents();e=a.content;c=a.type;l=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):u(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", | |
26 | +!1)}));break;case "image":e=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}u(e)&&e.parent().is(a.inner)||a.inner.append(e);b.trigger("beforeShow"); | |
27 | +a.inner.css("overflow","yes"===l?"scroll":"no"===l?"hidden":l);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(d.prevMethod)b.transitions[d.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,l=b.skin,g=b.inner,h=b.current,c=h.width,k=h.height,n=h.minWidth,v=h.minHeight,p=h.maxWidth, | |
28 | +q=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,z=m(y[1]+y[3]),s=m(y[0]+y[2]),w,A,u,D,B,G,C,E,I;e.add(l).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=m(l.outerWidth(!0)-l.width());w=m(l.outerHeight(!0)-l.height());A=z+y;u=s+w;D=F(c)?(a.w-A)*m(c)/100:c;B=F(k)?(a.h-u)*m(k)/100:k;if("iframe"===h.type){if(I=h.content,h.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(D).height(9999),G=I.contents().find("body"),r&&G.css("overflow-x", | |
29 | +"hidden"),B=G.outerHeight(!0))}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=m(D);k=m(B);E=D/B;n=m(F(n)?m(n,"w")-A:n);p=m(F(p)?m(p,"w")-A:p);v=m(F(v)?m(v,"h")-u:v);q=m(F(q)?m(q,"h")-u:q);G=p;C=q;h.fitToView&&(p=Math.min(a.w-A,p),q=Math.min(a.h-u,q));A=a.w-z;s=a.h-s;h.aspectRatio?(c>p&&(c=p,k=m(c/E)),k>q&&(k=q,c=m(k*E)),c<n&&(c=n,k=m(c/ | |
30 | +E)),k<v&&(k=v,c=m(k*E))):(c=Math.max(n,Math.min(c,p)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),k=g.height()),k=Math.max(v,Math.min(k,q)));if(h.fitToView)if(g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height(),h.aspectRatio)for(;(a>A||z>s)&&c>n&&k>v&&!(19<d++);)k=Math.max(v,Math.min(q,k-10)),c=m(k*E),c<n&&(c=n,k=m(c/E)),c>p&&(c=p,k=m(c/E)),g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height();else c=Math.max(n,Math.min(c,c-(a-A))),k=Math.max(v,Math.min(k,k-(z-s)));r&&"auto"===t&&k<B&& | |
31 | +c+y+r<A&&(c+=r);g.width(c).height(k);e.width(c+y);a=e.width();z=e.height();e=(a>A||z>s)&&c>n&&k>v;c=h.aspectRatio?c<G&&k<C&&c<D&&k<B:(c<G||k<C)&&(c<D||k<B);f.extend(h,{dim:{width:x(a),height:x(z)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:w,wrapSpace:z-l.outerHeight(!0),skinSpace:l.height()-k});!I&&h.autoHeight&&k>v&&k<q&&!c&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute", | |
32 | +top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){f(d.target).is("a")||f(d.target).parent().is("a")|| | |
33 | +(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),a.loop||a.index!==a.group.length-1)?b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play(!0)):b.play(!1))}, | |
34 | +_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,k=a.wPadding,n=b.getViewport();!e&&a.isDom&&d.is(":visible")&&(e=d.find("img:first"),e.length||(e=d));u(e)?(c=e.offset(),e.is("img")&& | |
35 | +(f=e.outerWidth(),g=e.outerHeight())):(c.top=n.y+(n.h-g)*a.topRatio,c.left=n.x+(n.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=n.y,c.left-=n.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-k*a.leftRatio),width:x(f+k),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](m("width"=== | |
36 | +f?c:c-g*e)),b.inner[f](m("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,l=f.extend({opacity:1},d);delete l.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(l,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&& | |
37 | +(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(m(e[g])-200),c[g]="+=200px"):(e[g]=x(m(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})}, | |
38 | +changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!t,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){var d;a=f.extend({},this.defaults,a);this.overlay&& | |
39 | +this.close();d=b.coming?b.coming.parent:a.parent;this.overlay=f('<div class="fancybox-overlay"></div>').appendTo(d&&d.lenth?d:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay", | |
40 | +function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); | |
41 | +J?(b=Math.max(H.documentElement.offsetWidth,H.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*").filter(function(){return"fixed"=== | |
42 | +f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", | |
43 | +position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(r(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),J&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(m(d.css("margin-bottom")))}d["top"===a.position?"prependTo": | |
44 | +"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",l=function(g){var h=f(this).blur(),k=d,l,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||h.is(".fancybox-wrap")||(l=a.groupAttr||"data-fancybox-group",m=h.attr(l),m||(l="rel",m=h.get(0)[l]),m&&""!==m&&"nofollow"!==m&&(h=c.length?f(c):e,h=h.filter("["+l+'="'+m+'"]'),k=h.index(this)),a.index=k,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;c&&!1!==a.live?p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')", | |
45 | +"click.fb-start",l):e.unbind("click.fb-start").bind("click.fb-start",l);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===w&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===w&&(f.support.fixedPosition=function(){var a=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"), | |
46 | +b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(s).width();K.addClass("fancybox-lock-test");d=f(s).width();K.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px !important;}</style>").appendTo("head")})})(window,document,jQuery); | |
0 | 47 | \ No newline at end of file | ... | ... |
css/fancybox_loading.gif
0 → 100644
6.41 KB
css/fancybox_loading@2x.gif
0 → 100644
13.7 KB
css/fancybox_overlay.png
0 → 100644
1012 Bytes
css/fancybox_sprite.png
0 → 100644
2.64 KB
css/fancybox_sprite@2x.png
0 → 100644
6.4 KB
css/fancylogin.css
0 → 100644
1 | +++ a/css/fancylogin.css | |
1 | +@import 'input_ui.css'; | |
2 | +@import 'regtab_ui.css'; | |
3 | + | |
4 | +.login-cover { | |
5 | + min-width: 400px; | |
6 | +} | |
7 | +.login-cover h2 { | |
8 | + text-align: center; | |
9 | + padding: 20px 40px 10px 40px; | |
10 | + font-family: 'Microsoft YaHei'; | |
11 | + font-weight: 100; | |
12 | +} | |
13 | +.login-cover ul { | |
14 | + padding: 10px 40px; | |
15 | +} | |
16 | +.login-list li { | |
17 | + margin-bottom: 20px; | |
18 | + position: relative; | |
19 | +} | |
20 | +.login-list >li { | |
21 | + clear: both; | |
22 | +} | |
23 | +.i-ren, | |
24 | +.i-pwd, | |
25 | +.i-reset { | |
26 | + width: 16px; | |
27 | + height: 20px; | |
28 | + background: url(../images/icon.png) no-repeat; | |
29 | + vertical-align: middle; | |
30 | + position: absolute; | |
31 | + left: 15px; | |
32 | + top: 11px; | |
33 | + border-right: 1px solid #ddd; | |
34 | + padding-right: 10px; | |
35 | +} | |
36 | +.i-ren { | |
37 | + background-position: -223px -213px; | |
38 | +} | |
39 | +.i-pwd { | |
40 | + background-position: -200px -212px; | |
41 | +} | |
42 | +.i-reset { | |
43 | + background-position: -175px -215px; | |
44 | + left: 328px; | |
45 | + top: 14px; | |
46 | + cursor: pointer; | |
47 | + border: 0; | |
48 | +} | |
49 | +.i-reset:hover { | |
50 | + background-position: -175px -239px; | |
51 | +} | |
52 | +.login-list li .ipt { | |
53 | + border-radius: 0; | |
54 | + border-color: #ddd; | |
55 | + padding-left: 60px; | |
56 | + width: 258px; | |
57 | + height: 40px; | |
58 | + line-height: 40px; | |
59 | +} | |
60 | +.login-list li .ipt:focus { | |
61 | + border-color: #3c6; | |
62 | +} | |
63 | +.login-list li .ipt:focus +.i-ren { | |
64 | + background-position: -223px -237px; | |
65 | + border-color: #3c6; | |
66 | +} | |
67 | +.login-list li .ipt:focus +.i-pwd { | |
68 | + background-position: -200px -236px; | |
69 | + border-color: #3c6; | |
70 | +} | |
71 | +.login-list li .iptCode { | |
72 | + padding: 0 5px 0 15px; | |
73 | + width: 180px; | |
74 | +} | |
75 | +.login-list .verify-img { | |
76 | + width: 110px; | |
77 | + height: 42px; | |
78 | +} | |
79 | +.login-list .bigBtn { | |
80 | + border-radius: 0; | |
81 | + height: 40px; | |
82 | + line-height: 40px; | |
83 | +} | |
84 | +.login-list .largebt { | |
85 | + width: 320px; | |
86 | + text-align: center; | |
87 | + padding: 0; | |
88 | +} | |
89 | +.back-link { | |
90 | + position: absolute; | |
91 | + right: 0; | |
92 | +} | |
93 | +.sqq, | |
94 | +.sbat, | |
95 | +.ssina { | |
96 | + width: 50px; | |
97 | + height: 50px; | |
98 | + background-image: url(../images/others.png); | |
99 | +} | |
100 | +.ssina { | |
101 | + background-position: 3px 0; | |
102 | +} | |
103 | +.ssina:hover { | |
104 | + background-position: -59px 0; | |
105 | +} | |
106 | +.sbat { | |
107 | + background-position: 3px -64px; | |
108 | +} | |
109 | +.sbat:hover { | |
110 | + background-position: -59px -64px; | |
111 | +} | |
112 | +.sqq { | |
113 | + background-position: 3px -127px; | |
114 | +} | |
115 | +.sqq:hover { | |
116 | + background-position: -59px -127px; | |
117 | +} | |
118 | +.login-cover .directSignin { | |
119 | + padding: 10px; | |
120 | +} | |
121 | +.directSignin li { | |
122 | + margin: 0 21px; | |
123 | +} | |
124 | +.lhd { | |
125 | + color: #a1a1a1; | |
126 | + text-align: center; | |
127 | + border-top: 1px solid #ddd; | |
128 | + margin: 20px 0; | |
129 | +} | |
130 | +.lhd span { | |
131 | + font: 14px/1 'Microsoft YaHei'; | |
132 | + margin-top: -7px; | |
133 | + padding: 0 10px; | |
134 | + background-color: #fff; | |
135 | +} | |
136 | +.hdwords { | |
137 | + font: 100 16px/1 'Microsoft YaHei'; | |
138 | + padding-bottom: 20px; | |
139 | +} | |
140 | +.login-cover .wt { | |
141 | + background-color: #f9f9f9; | |
142 | +} | |
143 | +.login-cover .wt:hover { | |
144 | + background-color: #fff; | |
145 | +} | |
146 | +h2.fast { | |
147 | + padding-top: 10px; | |
148 | + padding-bottom: 20px; | |
149 | +} | |
150 | +h2.fast ~.regtab .bigbt { | |
151 | + display: block; | |
152 | + width: 100%; | |
153 | + padding: 0; | |
154 | + text-align: center; | |
155 | +} | ... | ... |
css/font.css
0 → 100644
1 | +++ a/css/font.css | |
1 | +@import 'init_module.css'; | |
2 | +@import 'public_ui.css'; | |
3 | +@import 'header_ui.css'; | |
4 | +@import 'footer_index_ui.css'; | |
5 | +@import 'bread_ui.css'; | |
6 | +@import 'box_ui.css'; | |
7 | +@import 'fancybox/jquery.fancybox.css'; | |
8 | +@import 'fancylogin.css'; | |
9 | + | |
10 | +.back-link { | |
11 | + position: absolute; | |
12 | + right: 0; | |
13 | +} | |
14 | + | |
15 | + | ... | ... |
css/footer_index_ui.css
0 → 100644
1 | +++ a/css/footer_index_ui.css | |
1 | +.footer { | |
2 | + position: fixed; | |
3 | + bottom: 0; | |
4 | + left: 0; | |
5 | + width: 100%; | |
6 | + z-index: 1000; | |
7 | +} | |
8 | +.footer a { | |
9 | + color: #ccc; | |
10 | +} | |
11 | +.footer ul li { | |
12 | + float: left; | |
13 | + color: #bbb; | |
14 | + padding: 10px 0; | |
15 | +} | |
16 | +.footer ul em { | |
17 | + font-style: normal; | |
18 | + margin: 0 10px; | |
19 | +} | |
20 | +.copyright { | |
21 | + color: #777; | |
22 | + margin-left: 20px; | |
23 | +} | |
24 | +.aboutpay { | |
25 | + background-color: #ddd; | |
26 | + padding: 5px 0; | |
27 | + font-family: 'Microsoft YaHei'; | |
28 | + color: #b5b5b5; | |
29 | +} | |
30 | +.aboutpay li { | |
31 | + margin-right: 76px; | |
32 | +} | |
33 | +.aboutpay b { | |
34 | + color: #333; | |
35 | + font-size: 14px; | |
36 | +} | |
37 | +.aboutpay p { | |
38 | + font-size: 14px; | |
39 | + margin-top: 5px; | |
40 | +} | |
41 | +.aboutus { | |
42 | + background-color: #333; | |
43 | +} | |
44 | +.pay1, | |
45 | +.pay2, | |
46 | +.pay3 { | |
47 | + width: 29px; | |
48 | + height: 32px; | |
49 | + margin-right: 10px; | |
50 | +} | |
51 | +.pay1 { | |
52 | + background-position: 0 0; | |
53 | +} | |
54 | +.pay2 { | |
55 | + background-position: -38px 0; | |
56 | +} | |
57 | +.pay3 { | |
58 | + background-position: -76px 0; | |
59 | +} | |
60 | +.nomargin { | |
61 | + margin: 0 !important; | |
62 | +} | ... | ... |
css/footer_users_ui.css
0 → 100644
1 | +++ a/css/footer_users_ui.css | |
1 | +.footer{ | |
2 | + min-width: 1200px; | |
3 | +} | |
4 | +.footer-content{ | |
5 | + border: #ddd solid; | |
6 | + border-width: 1px 0; | |
7 | + background: #fff; | |
8 | +} | |
9 | +.footer-nav{ | |
10 | + width: 1200px; | |
11 | + margin: 0 auto; | |
12 | + text-align: center; | |
13 | + padding: 35px 0; | |
14 | +} | |
15 | +.footer-nav a { | |
16 | + color: #333; | |
17 | +} | |
18 | +.footer-nav dl{ | |
19 | + display: inline-block; | |
20 | + *display: inline; | |
21 | + *zoom:1; | |
22 | + vertical-align: top; | |
23 | + text-align: left; | |
24 | + margin: 0 40px; | |
25 | +} | |
26 | +.footer-nav dt{ | |
27 | + font: bold 14px/1 'Microsoft YaHei'; | |
28 | +} | |
29 | +.footer-nav dt span{ | |
30 | + display: inline-block; | |
31 | + *display: inline; | |
32 | + *zoom:1; | |
33 | + vertical-align: middle; | |
34 | + width: 25px; | |
35 | + height: 24px; | |
36 | + background: url('../images/icon.png') no-repeat; | |
37 | + margin: -2px 5px 0 0; | |
38 | +} | |
39 | +.footer-nav .icon1{ | |
40 | + background-position: -146px 0; | |
41 | +} | |
42 | +.footer-nav .icon2{ | |
43 | + background-position: -215px 0; | |
44 | +} | |
45 | +.footer-nav .icon3{ | |
46 | + background-position: -182px 0; | |
47 | +} | |
48 | +.footer-nav .icon4{ | |
49 | + background-position: -115px 0; | |
50 | +} | |
51 | + | |
52 | +.footer-nav dd{ | |
53 | + margin-top: 10px; | |
54 | + padding-left: 30px; | |
55 | +} | |
56 | + | |
57 | +.footer-bottom{ | |
58 | + text-align: center; | |
59 | + color: #969696; | |
60 | +} | |
61 | +.footer-link{ | |
62 | + margin: 20px 0 16px 0; | |
63 | +} | |
64 | +.footer-link li{ | |
65 | + display: inline-block; | |
66 | + *display: inline; | |
67 | + *zoom:1; | |
68 | + margin-right: 5px; | |
69 | +} | |
70 | +.footer-link li a{ | |
71 | + margin-right: 10px; | |
72 | + color: #969696; | |
73 | +} | |
74 | +.copyright { | |
75 | + margin-bottom: 20px; | |
76 | +} | ... | ... |
css/goodlist.css
0 → 100644
1 | +++ a/css/goodlist.css | |
1 | +@import 'carbox_ui.css'; | |
2 | +@import 'table_ui.css'; | |
3 | +@import 'hovtip_ui.css'; | |
4 | +@import 'fancyalter_ui.css'; | |
5 | +@import 'search_ui.css'; | |
6 | +@import 'Jselect_ui.css'; | |
7 | +@import 'region_ui.css'; | |
8 | + | |
9 | +.match .stop { | |
10 | + right: 0; | |
11 | + top: 0; | |
12 | +} | |
13 | +.match .bt { | |
14 | + height: 40px; | |
15 | + font: 14px/40px 'Microsoft YaHei'; | |
16 | + padding: 0 20px; | |
17 | + border-radius: 0; | |
18 | +} | |
19 | +.match .ht { | |
20 | + margin-right: 10px; | |
21 | + vertical-align: middle; | |
22 | +} | |
23 | +.prog, | |
24 | +.promove { | |
25 | + height: 14px; | |
26 | +} | |
27 | +.prog { | |
28 | + width: 130px; | |
29 | + background-color: #eaf3dd; | |
30 | + position: relative; | |
31 | +} | |
32 | +.promove { | |
33 | + width: 100%; | |
34 | + background-color: #8dc935; | |
35 | +} | |
36 | +.actarea { | |
37 | + width: 130px; | |
38 | + margin: 10px auto 0 auto; | |
39 | +} | |
40 | +.actarea .bt { | |
41 | + float: left; | |
42 | + height: 20px; | |
43 | + line-height: 20px; | |
44 | + width: 38px; | |
45 | +} | |
46 | +.actarea .wt { | |
47 | + margin-left: 10px; | |
48 | +} | |
49 | +.clock { | |
50 | + top: -3px; | |
51 | + left: -30px; | |
52 | + font-size: 14px; | |
53 | + | |
54 | +} | |
55 | +.t24 { | |
56 | + width: 24px; | |
57 | + height: 30px; | |
58 | + background-position: -137px -214px; | |
59 | + font-size: 0; | |
60 | +} | |
61 | +.ia { | |
62 | + width: 0; | |
63 | + height: 0; | |
64 | + border-width: 4px 4px 0 4px; | |
65 | + border-style: solid; | |
66 | + border-color: #06c transparent transparent transparent; | |
67 | + margin-top: -3px; | |
68 | +} | |
69 | +.formupper { | |
70 | + width: 280px; | |
71 | + padding-bottom: 15px; | |
72 | + border-bottom: 1px dashed #ddd; | |
73 | +} | |
74 | +.formupper .ipt { | |
75 | + height: 30px; | |
76 | + line-height: 30px; | |
77 | +} | |
78 | +.formupper .bt { | |
79 | + height: 34px; | |
80 | + line-height: 34px; | |
81 | +} | |
82 | +.formsub .ic { | |
83 | + background-position: -158px -62px; | |
84 | + background-color: #4aca10; | |
85 | +} | |
86 | +#fancy-suc { | |
87 | + text-align: center; | |
88 | +} | |
89 | +.alterbd { | |
90 | + padding: 20px 0; | |
91 | +} | |
92 | +.mini { | |
93 | + height: 20px; | |
94 | + line-height: 20px | |
95 | +} | |
96 | +.carinfo { | |
97 | + margin: 10px 0; | |
98 | + width: 400px; | |
99 | + max-height: 192px; | |
100 | + overflow-x: hidden; | |
101 | + overflow-y: auto; | |
102 | +} | |
103 | +.carinfo .mini { | |
104 | + padding: 0 5px; | |
105 | + border-radius: 0; | |
106 | +} | |
107 | +.minitab td { | |
108 | + padding: 5px; | |
109 | +} | |
110 | +.carsub { | |
111 | + text-align: center; | |
112 | +} | |
113 | +.carsub { | |
114 | + padding-top: 10px; | |
115 | + margin-top: 10px; | |
116 | + border-top: 1px dashed #ddd; | |
117 | +} | |
118 | +.carsub p { | |
119 | + padding: 5px 10px; | |
120 | + background-color: #f9f9f9; | |
121 | + text-align: left; | |
122 | +} | |
123 | +.dw { | |
124 | + width: 60px; | |
125 | +} | |
126 | +#fancy-match { | |
127 | + padding: 0 50px; | |
128 | +} | |
129 | +#fancy-match td { | |
130 | + text-align: left; | |
131 | + vertical-align: top; | |
132 | +} | |
133 | +.coverbox { | |
134 | + background: url(../images/goodlistcover.png); | |
135 | + width: 100%; | |
136 | + height: 100%; | |
137 | + position: fixed; | |
138 | + top: 0; | |
139 | + left: 0; | |
140 | + z-index: 10000; | |
141 | +} | |
142 | +.coverinner { | |
143 | + width: 1200px; | |
144 | + margin: 0 auto; | |
145 | +} | |
146 | +.coverinner img { | |
147 | + width: 1202px; | |
148 | + margin-left: -2px; | |
149 | +} | ... | ... |
css/guide.css
0 → 100644
1 | +++ a/css/guide.css | |
1 | +/* | |
2 | +Icon classes can be used entirely standalone. They are named after their original file names. | |
3 | + | |
4 | +```html | |
5 | +<!-- `display: block` sprite --> | |
6 | +<div class="icon-home"></div> | |
7 | + | |
8 | +<!-- `display: inline-block` sprite --> | |
9 | +<img class="icon-home" /> | |
10 | +``` | |
11 | +*/ | |
12 | +.icon_fn_0 { | |
13 | + background-image: url(../images/guide.png); | |
14 | + background-position: -454px 0px; | |
15 | + width: 365px; | |
16 | + height: 272px; | |
17 | +} | |
18 | +.icon_fn_1 { | |
19 | + background-image: url(../images/guide.png); | |
20 | + background-position: 0px 0px; | |
21 | + width: 448px; | |
22 | + height: 272px; | |
23 | +} | |
24 | +.icon_fn_10 { | |
25 | + background-image: url(../images/guide.png); | |
26 | + background-position: -571px -278px; | |
27 | + width: 134px; | |
28 | + height: 48px; | |
29 | +} | |
30 | +.icon_fn_2 { | |
31 | + background-image: url(../images/guide.png); | |
32 | + background-position: -489px -383px; | |
33 | + width: 116px; | |
34 | + height: 48px; | |
35 | +} | |
36 | +.icon_fn_3 { | |
37 | + background-image: url(../images/guide.png); | |
38 | + background-position: -689px -332px; | |
39 | + width: 62px; | |
40 | + height: 20px; | |
41 | +} | |
42 | +.icon_fn_4 { | |
43 | + background-image: url(../images/guide.png); | |
44 | + background-position: 0px -278px; | |
45 | + width: 565px; | |
46 | + height: 99px; | |
47 | +} | |
48 | +.icon_fn_5 { | |
49 | + background-image: url(../images/guide.png); | |
50 | + background-position: -711px -278px; | |
51 | + width: 78px; | |
52 | + height: 46px; | |
53 | +} | |
54 | +.icon_fn_6 { | |
55 | + background-image: url(../images/guide.png); | |
56 | + background-position: -571px -332px; | |
57 | + width: 53px; | |
58 | + height: 36px; | |
59 | +} | |
60 | +.icon_fn_7 { | |
61 | + background-image: url(../images/guide.png); | |
62 | + background-position: 0px -383px; | |
63 | + width: 483px; | |
64 | + height: 89px; | |
65 | +} | |
66 | +.icon_fn_8 { | |
67 | + background-image: url(../images/guide.png); | |
68 | + background-position: 0px -478px; | |
69 | + width: 301px; | |
70 | + height: 127px; | |
71 | +} | |
72 | +.icon_fn_9 { | |
73 | + background-image: url(../images/guide.png); | |
74 | + background-position: -630px -332px; | |
75 | + width: 53px; | |
76 | + height: 36px; | |
77 | +} | ... | ... |
css/header_ui.css
0 → 100644
1 | +++ a/css/header_ui.css | |
1 | +.header{ | |
2 | + min-width: 1200px; | |
3 | + background-color: #fff; | |
4 | + border-bottom: 1px solid #ebebeb; | |
5 | + position: relative; | |
6 | + z-index: 1; | |
7 | +} | |
8 | +.user-header{ | |
9 | + border:0; | |
10 | +} | |
11 | +.user-header h1{ | |
12 | + float: left; | |
13 | + margin-top: 10px; | |
14 | + border-left: 1px #ccc solid; | |
15 | + padding: 10px 20px; | |
16 | + font-size: 20px; | |
17 | + color: #fff; | |
18 | +} | |
19 | +.header-content{ | |
20 | + width: 1200px; | |
21 | + margin: 0 auto; | |
22 | +} | |
23 | +.logo{ | |
24 | + float: left; | |
25 | + width: 172px; | |
26 | + height: 40px; | |
27 | + padding: 14px 0; | |
28 | + overflow: hidden; | |
29 | + margin-right: 60px; | |
30 | +} | |
31 | + | |
32 | +.nav{ | |
33 | + float: left; | |
34 | +} | |
35 | +.nav li{ | |
36 | + float: left; | |
37 | + margin-right: 15px; | |
38 | + height: 20px; | |
39 | + line-height: 20px; | |
40 | + padding: 18px 0 25px 0; | |
41 | +} | |
42 | +.nav li a{ | |
43 | + display: block; | |
44 | + padding: 0 15px 5px 15px; | |
45 | + font-size: 14px; | |
46 | + text-align: center; | |
47 | + color: #333; | |
48 | + transition: border 0.3s; | |
49 | + -webkit-transition: border 0.3s; | |
50 | + border: solid #3cb04d; | |
51 | + border-width: 0 0 3px 0; | |
52 | +} | |
53 | +.nav li a:hover, | |
54 | +.nav li .current{ | |
55 | + border-bottom-color: #f60; | |
56 | +} | |
57 | + | |
58 | + | |
59 | +.header-tools{ | |
60 | + margin-top: 18px; | |
61 | +} | |
62 | + | |
63 | +.header-tools .a-link{ | |
64 | + color: #333; | |
65 | + font-size: 14px; | |
66 | + line-height: 30px; | |
67 | + margin: -3px 3px 0 3px; | |
68 | + font: 14px/1 'Microsoft YaHei'; | |
69 | +} | |
70 | +.link-register, | |
71 | +.link-login, | |
72 | +.dropdown a span, | |
73 | +.search-box, | |
74 | +.header-tools .message, | |
75 | +.header-tools .user-info{ | |
76 | + display: inline-block; | |
77 | + *display: inline; | |
78 | + *zoom:1; | |
79 | + vertical-align: middle; | |
80 | +} | |
81 | +.search-box{ | |
82 | + position: relative; | |
83 | + height: 30px; | |
84 | + min-width: 120px; | |
85 | +} | |
86 | +.search-input{ | |
87 | + position: absolute; | |
88 | + right: 0; | |
89 | + top: 0; | |
90 | + border: 1px #ccc solid; | |
91 | + border-radius: 20px; | |
92 | + height: 28px; | |
93 | + line-height: 28px\9; | |
94 | + padding-left: 28px; | |
95 | + outline: none; | |
96 | + width: 88px; | |
97 | + background: url('../images/icon.png') #fff 7px 6px no-repeat; | |
98 | +} | |
99 | +.header-tools .message{ | |
100 | + width: 20px; | |
101 | + height: 16px; | |
102 | + background: url('../images/icon.png') -50px -40px no-repeat; | |
103 | + margin: 0 15px; | |
104 | + position: relative; | |
105 | + cursor: pointer; | |
106 | +} | |
107 | +.header-tools .message span{ | |
108 | + position: absolute; | |
109 | + width: 10px; | |
110 | + height: 10px; | |
111 | + right: -6px; | |
112 | + top: -3px; | |
113 | + background-color: #f60; | |
114 | + border-radius: 100%; | |
115 | +} | |
116 | +.user-info{ | |
117 | + cursor: pointer; | |
118 | + position: relative; | |
119 | +} | |
120 | +.header .dropdown{ | |
121 | + position: absolute; | |
122 | + top: 49px; | |
123 | + right: 0; | |
124 | + display: none; | |
125 | +} | |
126 | +.header .dropdown i, | |
127 | +.header .dropdown em { | |
128 | + display: none; | |
129 | +} | |
130 | +.header .dropdown i{ | |
131 | + position: absolute; | |
132 | + top: -12px; | |
133 | + right: 25px; | |
134 | + width: 0; | |
135 | + height: 0; | |
136 | + font-size: 0; | |
137 | + overflow: hidden; | |
138 | + border: 6px solid #373b65; | |
139 | + border-color: transparent transparent #373b65 transparent; | |
140 | +} | |
141 | +.header .dropdown em{ | |
142 | + position: absolute; | |
143 | + top: -11px; | |
144 | + right: 25px; | |
145 | + width: 0; | |
146 | + height: 0; | |
147 | + font-size: 0; | |
148 | + overflow: hidden; | |
149 | + border: 6px solid #fff; | |
150 | + border-color: transparent transparent #fff transparent; | |
151 | +} | |
152 | + | |
153 | +.header .dropdown ul{ | |
154 | + background: transparent; | |
155 | + border: 1px transparent solid; | |
156 | + overflow: hidden; | |
157 | +} | |
158 | +.header .dropdown a{ | |
159 | + display: block; | |
160 | + height: 32px; | |
161 | + line-height: 32px; | |
162 | + white-space: nowrap; | |
163 | + padding-left: 10px; | |
164 | + min-width: 85px; | |
165 | + font-size: 13px; | |
166 | + color: #fff; | |
167 | + background-color: #c1c1c1; | |
168 | +} | |
169 | +.header .dropdown a:hover{ | |
170 | + background: #b1b1b1; | |
171 | +} | |
172 | + | |
173 | +.user-photo{ | |
174 | + display: inline-block; | |
175 | + *display: inline; | |
176 | + *zoom:1; | |
177 | + vertical-align: middle; | |
178 | + overflow: hidden; | |
179 | + font-size: 14px; | |
180 | + color: #333; | |
181 | +} | |
182 | +.user-photo img{ | |
183 | + width: 100%; | |
184 | + height: 100%; | |
185 | +} | |
186 | +.icon-down-arrow{ | |
187 | + display: inline-block; | |
188 | + *display: inline; | |
189 | + *zoom:1; | |
190 | + vertical-align: middle; | |
191 | + border-width: 6px 5px 0 5px; | |
192 | + border-style: solid; | |
193 | + border-color: #666 transparent; | |
194 | + margin-left: 5px; | |
195 | + height: 0; | |
196 | + width: 0; | |
197 | +} | |
198 | +.dropdown a span { | |
199 | + width: 20px; | |
200 | + height: 20px; | |
201 | + background: url(../images/icon.png) no-repeat 0 -41px; | |
202 | +} | |
203 | +.link-register { | |
204 | + border: 1px solid #fff; | |
205 | + padding: 0 10px; | |
206 | +} | ... | ... |
css/helpers/fancybox_buttons.png
0 → 100644
1.05 KB
css/helpers/jquery.fancybox-buttons.css
0 → 100644
1 | +++ a/css/helpers/jquery.fancybox-buttons.css | |
1 | +#fancybox-buttons { | |
2 | + position: fixed; | |
3 | + left: 0; | |
4 | + width: 100%; | |
5 | + z-index: 8050; | |
6 | +} | |
7 | + | |
8 | +#fancybox-buttons.top { | |
9 | + top: 10px; | |
10 | +} | |
11 | + | |
12 | +#fancybox-buttons.bottom { | |
13 | + bottom: 10px; | |
14 | +} | |
15 | + | |
16 | +#fancybox-buttons ul { | |
17 | + display: block; | |
18 | + width: 166px; | |
19 | + height: 30px; | |
20 | + margin: 0 auto; | |
21 | + padding: 0; | |
22 | + list-style: none; | |
23 | + border: 1px solid #111; | |
24 | + border-radius: 3px; | |
25 | + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); | |
26 | + -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); | |
27 | + box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); | |
28 | + background: rgb(50,50,50); | |
29 | + background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); | |
30 | + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); | |
31 | + background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
32 | + background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
33 | + background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
34 | + background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); | |
35 | + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); | |
36 | +} | |
37 | + | |
38 | +#fancybox-buttons ul li { | |
39 | + float: left; | |
40 | + margin: 0; | |
41 | + padding: 0; | |
42 | +} | |
43 | + | |
44 | +#fancybox-buttons a { | |
45 | + display: block; | |
46 | + width: 30px; | |
47 | + height: 30px; | |
48 | + text-indent: -9999px; | |
49 | + background-color: transparent; | |
50 | + background-image: url('fancybox_buttons.png'); | |
51 | + background-repeat: no-repeat; | |
52 | + outline: none; | |
53 | + opacity: 0.8; | |
54 | +} | |
55 | + | |
56 | +#fancybox-buttons a:hover { | |
57 | + opacity: 1; | |
58 | +} | |
59 | + | |
60 | +#fancybox-buttons a.btnPrev { | |
61 | + background-position: 5px 0; | |
62 | +} | |
63 | + | |
64 | +#fancybox-buttons a.btnNext { | |
65 | + background-position: -33px 0; | |
66 | + border-right: 1px solid #3e3e3e; | |
67 | +} | |
68 | + | |
69 | +#fancybox-buttons a.btnPlay { | |
70 | + background-position: 0 -30px; | |
71 | +} | |
72 | + | |
73 | +#fancybox-buttons a.btnPlayOn { | |
74 | + background-position: -30px -30px; | |
75 | +} | |
76 | + | |
77 | +#fancybox-buttons a.btnToggle { | |
78 | + background-position: 3px -60px; | |
79 | + border-left: 1px solid #111; | |
80 | + border-right: 1px solid #3e3e3e; | |
81 | + width: 35px | |
82 | +} | |
83 | + | |
84 | +#fancybox-buttons a.btnToggleOn { | |
85 | + background-position: -27px -60px; | |
86 | +} | |
87 | + | |
88 | +#fancybox-buttons a.btnClose { | |
89 | + border-left: 1px solid #111; | |
90 | + width: 35px; | |
91 | + background-position: -56px 0px; | |
92 | +} | |
93 | + | |
94 | +#fancybox-buttons a.btnDisabled { | |
95 | + opacity : 0.4; | |
96 | + cursor: default; | |
97 | +} | |
0 | 98 | \ No newline at end of file | ... | ... |