compass-jquery-plugin 0.3.3.0 → 0.3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -4
- data/VERSION.yml +1 -1
- data/lib/handle_js_files.rb +1 -1
- data/lib/jquery/gridify/grid_column.rb +4 -0
- data/lib/jquery/gridify/grid_options.rb +5 -1
- data/lib/jquery/gridify/grid_view.rb +8 -3
- data/templates/dynatree/jquery.dynatree.js +184 -73
- data/templates/dynatree/jquery.dynatree.min.js +78 -76
- data/templates/emulators/emulators/galaxy.tab.7.7.landscape.png +0 -0
- data/templates/emulators/emulators/{palm.pre.2.landscape.scss → galaxy.tab.7.7.landscape.scss} +7 -7
- data/templates/emulators/emulators/galaxy.tab.7.7.portrait.png +0 -0
- data/templates/emulators/emulators/{palm.pre.2.portrait.scss → galaxy.tab.7.7.portrait.scss} +7 -7
- data/templates/emulators/manifest.rb +4 -4
- data/templates/graphics/config/initializers/graphics.rb +1 -1
- data/templates/graphics/highcharts/dark-blue.js +257 -159
- data/templates/graphics/highcharts/dark-blue.min.js +4 -2
- data/templates/graphics/highcharts/dark-green.js +257 -159
- data/templates/graphics/highcharts/dark-green.min.js +4 -2
- data/templates/graphics/highcharts/gray.js +252 -154
- data/templates/graphics/highcharts/gray.min.js +4 -2
- data/templates/graphics/highcharts/grid.js +84 -84
- data/templates/graphics/highcharts/highslide-full.min.js +3 -3
- data/templates/graphics/highcharts/highslide.js +3391 -0
- data/templates/graphics/highcharts/highslide.min.js +132 -0
- data/templates/graphics/jquery.ganttView.min.js +4 -4
- data/templates/graphics/jquery.highcharts.js +15379 -1071
- data/templates/graphics/jquery.highcharts.min.js +384 -167
- data/templates/graphics/jquery.sparkline.min.js +2 -2
- data/templates/graphics/manifest.rb +2 -0
- data/templates/ical/jquery.ical.min.js +46 -47
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +2 -2
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +2 -2
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +20 -19
- data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +7 -6
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +28 -28
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +6 -6
- data/templates/jqgrid/i18n/jqgrid/locale-th.js +134 -0
- data/templates/jqgrid/i18n/jqgrid/locale-th.min.js +6 -0
- data/templates/jqgrid/jquery.jqGrid.js +674 -598
- data/templates/jqgrid/jquery.jqGrid.min.js +444 -441
- data/templates/jqgrid/jquery/jqGrid.scss +0 -3
- data/templates/jqgrid/manifest.rb +2 -0
- data/templates/jqtouch/jquery.jqtouch.js +201 -156
- data/templates/jqtouch/jquery.jqtouch.min.js +1 -1
- data/templates/jqtouch/jquery/touch/apple.scss +2 -2
- data/templates/jqtouch/jquery/touch/default.scss +2 -2
- data/templates/jquery/amplify.store.js +111 -78
- data/templates/jquery/amplify.store.min.js +6 -6
- data/templates/jquery/history.js +3 -3
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.min.js +1 -1
- data/templates/jquery/jquery-ui.js +1286 -1042
- data/templates/jquery/jquery-ui.min.js +320 -316
- data/templates/jquery/jquery.contextMenu.js +2 -2
- data/templates/jquery/jquery.easing.js +152 -152
- data/templates/jquery/jquery.easing.min.js +7 -7
- data/templates/jquery/jquery.farbtastic.min.js +2 -2
- data/templates/jquery/jquery.form.js +30 -30
- data/templates/jquery/jquery.haml.min.js +5 -5
- data/templates/jquery/jquery.hotkeys.min.js +1 -1
- data/templates/jquery/jquery.js +419 -311
- data/templates/jquery/jquery.layout.js +59 -40
- data/templates/jquery/jquery.min.js +176 -176
- data/templates/jquery/jquery.themeswitchertool.js +37 -37
- data/templates/jquery/jquery.tmpl.js +4 -4
- data/templates/jquery/jquery.tmpl.min.js +9 -9
- data/templates/jquery/jquery.tmplPlus.min.js +3 -3
- data/templates/jquery/jquery.tokeninput.js +613 -490
- data/templates/jquery/jquery.tokeninput.min.js +17 -14
- data/templates/jquery/jquery/ui/_theme.scss +39 -63
- data/templates/jquery/json.js +31 -15
- data/templates/jstree/jquery.jstree.js +415 -410
- data/templates/jstree/jquery.jstree.min.js +134 -133
- data/templates/markitup/jquery.markitup.js +567 -560
- data/templates/markitup/jquery.markitup.min.js +1 -1
- data/templates/markitup/jquery/markitup/sets/default.scss +7 -3
- data/templates/markitup/jquery/markitup/sets/default/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup.scss +3 -10
- data/templates/markitup/jquery/markitup/skins/markitup/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple.scss +2 -3
- data/templates/markitup/jquery/markitup/skins/simple/menu.png +0 -0
- data/templates/markitup/manifest.rb +2 -0
- data/templates/markitup/markitup/jquery.markitup.set.default.js +21 -21
- data/templates/markitup/markitup/jquery.markitup.set.default.min.js +3 -2
- data/templates/mobile/jquery.mobile.js +5230 -2846
- data/templates/mobile/jquery.mobile.min.js +192 -46
- data/templates/mobile/jquery/mobile/_base.scss +141 -18
- data/templates/mobile/jquery/mobile/default.scss +263 -66
- data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia.scss +242 -53
- data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
- data/templates/tiny_mce/manifest.rb +2 -0
- data/templates/tiny_mce/tiny_mce/langs/de.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advhr/rule.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/image.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/js/image.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlink/link.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autolink/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autolink/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/emotions/emotions.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/example/dialog.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/example_dependency/editor_plugin_src.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/fullpage.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/template.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/lists/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/lists/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/js/media.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/langs/en_dlg.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/media.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/pastetext.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/pasteword.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/preview/example.html +16 -17
- data/templates/tiny_mce/tiny_mce/plugins/preview/preview.html +9 -10
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/searchreplace.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/style/js/props.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/style/props.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/cell.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/js/cell.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/js/row.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/langs/de_dlg.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/langs/en_dlg.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/merge_cells.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/row.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/table.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/template/blank.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/template/template.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/abbr.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/acronym.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/attributes.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/cite.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/del.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/ins.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/about.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/anchor.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/color_picker.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/image.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/flash.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/image.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/link.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/content.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/dialog.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/content.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/dialog.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/source_editor.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/tiny_mce.js +1 -1
- data/templates/tools/flowplayer.min.js +1 -1
- data/templates/tools/jquery.tools.js +17 -17
- data/templates/tools/jquery.tools.min.js +22 -22
- metadata +17 -9
- data/templates/emulators/emulators/palm.pre.2.landscape.png +0 -0
- data/templates/emulators/emulators/palm.pre.2.portrait.png +0 -0
@@ -1,4 +1,6 @@
|
|
1
1
|
Highcharts.theme={colors:["#DDDF0D","#7798BF","#55BF3B","#DF5353","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:[0,0,0,400],stops:[[0,"rgb(96, 96, 96)"],[1,"rgb(16, 16, 16)"]]},borderWidth:0,borderRadius:15,plotBackgroundColor:null,plotShadow:!1,plotBorderWidth:0},title:{style:{color:"#FFF",font:"16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}},subtitle:{style:{color:"#DDD",font:"12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}},
|
2
2
|
xAxis:{gridLineWidth:0,lineColor:"#999",tickColor:"#999",labels:{style:{color:"#999",fontWeight:"bold"}},title:{style:{color:"#AAA",font:"bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}}},yAxis:{alternateGridColor:null,minorTickInterval:null,gridLineColor:"rgba(255, 255, 255, .1)",lineWidth:0,tickWidth:0,labels:{style:{color:"#999",fontWeight:"bold"}},title:{style:{color:"#AAA",font:"bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif"}}},
|
3
|
-
legend:{itemStyle:{color:"#CCC"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#333"}},labels:{style:{color:"#CCC"}},tooltip:{backgroundColor:{linearGradient:[0,0,0,50],stops:[[0,"rgba(96, 96, 96, .8)"],[1,"rgba(16, 16, 16, .8)"]]},borderWidth:0,style:{color:"#FFF"}},plotOptions:{line:{dataLabels:{color:"#CCC"},marker:{lineColor:"#333"}},spline:{marker:{lineColor:"#333"}},scatter:{marker:{lineColor:"#333"}}},toolbar:{itemStyle:{color:"#CCC"}},navigation:{buttonOptions:{backgroundColor:{linearGradient:[0,
|
4
|
-
0,0,20],stops:[[0.4,"#606060"],[0.6,"#333333"]]},borderColor:"#000000",symbolStroke:"#C0C0C0",hoverSymbolStroke:"#FFFFFF"}},exporting:{buttons:{exportButton:{symbolFill:"#55BE3B"},printButton:{symbolFill:"#7797BE"}}},
|
3
|
+
legend:{itemStyle:{color:"#CCC"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#333"}},labels:{style:{color:"#CCC"}},tooltip:{backgroundColor:{linearGradient:[0,0,0,50],stops:[[0,"rgba(96, 96, 96, .8)"],[1,"rgba(16, 16, 16, .8)"]]},borderWidth:0,style:{color:"#FFF"}},plotOptions:{line:{dataLabels:{color:"#CCC"},marker:{lineColor:"#333"}},spline:{marker:{lineColor:"#333"}},scatter:{marker:{lineColor:"#333"}},candlestick:{lineColor:"white"}},toolbar:{itemStyle:{color:"#CCC"}},navigation:{buttonOptions:{backgroundColor:{linearGradient:[0,
|
4
|
+
0,0,20],stops:[[0.4,"#606060"],[0.6,"#333333"]]},borderColor:"#000000",symbolStroke:"#C0C0C0",hoverSymbolStroke:"#FFFFFF"}},exporting:{buttons:{exportButton:{symbolFill:"#55BE3B"},printButton:{symbolFill:"#7797BE"}}},rangeSelector:{buttonTheme:{fill:{linearGradient:[0,0,0,20],stops:[[0.4,"#888"],[0.6,"#555"]]},stroke:"#000000",style:{color:"#CCC",fontWeight:"bold"},states:{hover:{fill:{linearGradient:[0,0,0,20],stops:[[0.4,"#BBB"],[0.6,"#888"]]},stroke:"#000000",style:{color:"white"}},select:{fill:{linearGradient:[0,
|
5
|
+
0,0,20],stops:[[0.1,"#000"],[0.3,"#333"]]},stroke:"#000000",style:{color:"yellow"}}}},inputStyle:{backgroundColor:"#333",color:"silver"},labelStyle:{color:"silver"}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(16, 16, 16, 0.5)",series:{color:"#7798BF",lineColor:"#A6C7ED"}},scrollbar:{barBackgroundColor:{linearGradient:[0,0,0,20],stops:[[0.4,"#888"],[0.6,"#555"]]},barBorderColor:"#CCC",buttonArrowColor:"#CCC",buttonBackgroundColor:{linearGradient:[0,
|
6
|
+
0,0,20],stops:[[0.4,"#888"],[0.6,"#555"]]},buttonBorderColor:"#CCC",rifleColor:"#FFF",trackBackgroundColor:{linearGradient:[0,0,0,10],stops:[[0,"#000"],[1,"#333"]]},trackBorderColor:"#666"},legendBackgroundColor:"rgba(48, 48, 48, 0.8)",legendBackgroundColorSolid:"rgb(70, 70, 70)",dataLabelsColor:"#444",textColor:"#E0E0E0",maskColor:"rgba(255,255,255,0.3)"};var highchartsOptions=Highcharts.setOptions(Highcharts.theme);
|
@@ -4,92 +4,92 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
Highcharts.theme = {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
7
|
+
colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
|
8
|
+
chart: {
|
9
|
+
backgroundColor: {
|
10
|
+
linearGradient: [0, 0, 500, 500],
|
11
|
+
stops: [
|
12
|
+
[0, 'rgb(255, 255, 255)'],
|
13
|
+
[1, 'rgb(240, 240, 255)']
|
14
|
+
]
|
15
|
+
}
|
16
|
+
,
|
17
|
+
borderWidth: 2,
|
18
|
+
plotBackgroundColor: 'rgba(255, 255, 255, .9)',
|
19
|
+
plotShadow: true,
|
20
|
+
plotBorderWidth: 1
|
21
|
+
},
|
22
|
+
title: {
|
23
|
+
style: {
|
24
|
+
color: '#000',
|
25
|
+
font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
|
26
|
+
}
|
27
|
+
},
|
28
|
+
subtitle: {
|
29
|
+
style: {
|
30
|
+
color: '#666666',
|
31
|
+
font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
|
32
|
+
}
|
33
|
+
},
|
34
|
+
xAxis: {
|
35
|
+
gridLineWidth: 1,
|
36
|
+
lineColor: '#000',
|
37
|
+
tickColor: '#000',
|
38
|
+
labels: {
|
39
|
+
style: {
|
40
|
+
color: '#000',
|
41
|
+
font: '11px Trebuchet MS, Verdana, sans-serif'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
title: {
|
45
|
+
style: {
|
46
|
+
color: '#333',
|
47
|
+
fontWeight: 'bold',
|
48
|
+
fontSize: '12px',
|
49
|
+
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
yAxis: {
|
55
|
+
minorTickInterval: 'auto',
|
56
|
+
lineColor: '#000',
|
57
|
+
lineWidth: 1,
|
58
|
+
tickWidth: 1,
|
59
|
+
tickColor: '#000',
|
60
|
+
labels: {
|
61
|
+
style: {
|
62
|
+
color: '#000',
|
63
|
+
font: '11px Trebuchet MS, Verdana, sans-serif'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
title: {
|
67
|
+
style: {
|
68
|
+
color: '#333',
|
69
|
+
fontWeight: 'bold',
|
70
|
+
fontSize: '12px',
|
71
|
+
fontFamily: 'Trebuchet MS, Verdana, sans-serif'
|
72
|
+
}
|
73
|
+
}
|
74
|
+
},
|
75
|
+
legend: {
|
76
|
+
itemStyle: {
|
77
|
+
font: '9pt Trebuchet MS, Verdana, sans-serif',
|
78
|
+
color: 'black'
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
80
|
+
},
|
81
|
+
itemHoverStyle: {
|
82
|
+
color: '#039'
|
83
|
+
},
|
84
|
+
itemHiddenStyle: {
|
85
|
+
color: 'gray'
|
86
|
+
}
|
87
|
+
},
|
88
|
+
labels: {
|
89
|
+
style: {
|
90
|
+
color: '#99b'
|
91
|
+
}
|
92
|
+
}
|
93
93
|
};
|
94
94
|
|
95
95
|
// Apply the theme
|
@@ -14,9 +14,9 @@ hs.sleeping[e]=null,!1;hs.hasHtmlExpanders=!0}try{return new hs.Expander(a,b,c,d
|
|
14
14
|
b=/{hs\.lang\.([^}]+)\}/g,c=a.match(b),d;if(c)for(var e=0;e<c.length;e++)d=c[e].replace(b,"$1"),typeof hs.lang[d]!="undefined"&&(a=a.replace(c[e],hs.lang[d]));return a},setClickEvents:function(){for(var a=document.getElementsByTagName("a"),b=0;b<a.length;b++){var c=hs.isUnobtrusiveAnchor(a[b]);if(c&&!a[b].hsHasSetClick)(function(){var d=c;if(hs.fireEvent(hs,"onSetClickEvent",{element:a[b],type:d}))a[b].onclick=c=="image"?function(){return hs.expand(this)}:function(){return hs.htmlExpand(this,{objectType:d})}})(),
|
15
15
|
a[b].hsHasSetClick=!0}hs.getAnchors()},isUnobtrusiveAnchor:function(a){if(a.rel=="highslide")return"image";else if(a.rel=="highslide-ajax")return"ajax";else if(a.rel=="highslide-iframe")return"iframe";else if(a.rel=="highslide-swf")return"swf"},getCacheBinding:function(a){for(var b=0;b<hs.cacheBindings.length;b++)if(hs.cacheBindings[b][0]==a)return a=hs.cacheBindings[b][1],hs.cacheBindings[b][1]=a.cloneNode(1),a;return null},preloadAjax:function(){for(var a=hs.getAnchors(),b=0;b<a.htmls.length;b++){var c=
|
16
16
|
a.htmls[b];hs.getParam(c,"objectType")=="ajax"&&hs.getParam(c,"cacheAjax")&&hs.push(hs.preloadTheseAjax,c)}hs.preloadAjaxElement(0)},preloadAjaxElement:function(a){if(hs.preloadTheseAjax[a]){var b=hs.preloadTheseAjax[a],c=hs.getNode(hs.getParam(b,"contentId"));c||(c=hs.getSelfRendered());var d=new hs.Ajax(b,c,1);d.onError=function(){};d.onLoad=function(){hs.push(hs.cacheBindings,[b,c]);hs.preloadAjaxElement(a+1)};d.run()}},focusTopmost:function(){for(var a=0,b=-1,c=hs.expanders,d,e=0;e<c.length;e++)if(d=
|
17
|
-
c[e])if((d=d.wrapper.style.zIndex)&&d>a)a=d,b=e;b==-1?hs.focusKey=-1:c[b].focus()},getParam:function(a,b){a.getParams=a.onclick;var c=a.getParams?a.getParams():null;a.getParams=null;return c&&typeof c[b]!="undefined"?c[b]:typeof hs[b]!="undefined"?hs[b]:null},getSrc:function(a){var b=hs.getParam(a,"src");
|
18
|
-
hs.garbageBin.
|
19
|
-
|
17
|
+
c[e])if((d=d.wrapper.style.zIndex)&&d>a)a=d,b=e;b==-1?hs.focusKey=-1:c[b].focus()},getParam:function(a,b){a.getParams=a.onclick;var c=a.getParams?a.getParams():null;a.getParams=null;return c&&typeof c[b]!="undefined"?c[b]:typeof hs[b]!="undefined"?hs[b]:null},getSrc:function(a){var b=hs.getParam(a,"src");return b?b:a.href},getNode:function(a){var b=hs.$(a),c=hs.clones[a];return!b&&!c?null:c?c.cloneNode(!0):(c=b.cloneNode(!0),c.id="",hs.clones[a]=c,b)},discardElement:function(a){a&&hs.garbageBin.appendChild(a);
|
18
|
+
hs.garbageBin.innerHTML=""},dim:function(a){if(!hs.dimmer)b=!0,hs.dimmer=hs.createElement("div",{className:"highslide-dimming highslide-viewport-size",owner:"",onclick:function(){hs.fireEvent(hs,"onDimmerClick")&&hs.close()}},{visibility:"visible",opacity:0},hs.container,!0);hs.dimmer.style.display="";var b=hs.dimmer.owner=="";hs.dimmer.owner+="|"+a.key;b&&(hs.geckoMac&&hs.dimmingGeckoFix?hs.setStyles(hs.dimmer,{background:"url("+hs.graphicsDir+"geckodimmer.png)",opacity:1}):hs.animate(hs.dimmer,
|
19
|
+
{opacity:a.dimmingOpacity},hs.dimmingDuration))},undim:function(a){if(hs.dimmer){if(typeof a!="undefined")hs.dimmer.owner=hs.dimmer.owner.replace("|"+a,"");if(!(typeof a!="undefined"&&hs.dimmer.owner!=""||hs.upcoming&&hs.getParam(hs.upcoming,"dimmingOpacity")))hs.geckoMac&&hs.dimmingGeckoFix?hs.dimmer.style.display="none":hs.animate(hs.dimmer,{opacity:0},hs.dimmingDuration,null,function(){hs.dimmer.style.display="none"})}},transit:function(a,b){var c=b||hs.getExpander(),b=c;if(hs.upcoming)return!1;
|
20
20
|
else hs.last=c;hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);try{hs.upcoming=a,a.onclick()}catch(d){hs.last=hs.upcoming=null}try{(!a||b.transitions[1]!="crossfade")&&b.close()}catch(e){}return!1},previousOrNext:function(a,b){var c=hs.getExpander(a);return c?hs.transit(c.getAdjacentAnchor(b),c):!1},previous:function(a){return hs.previousOrNext(a,-1)},next:function(a){return hs.previousOrNext(a,1)},keyHandler:function(a){if(!a)a=window.event;if(!a.target)a.target=
|
21
21
|
a.srcElement;if(typeof a.target.form!="undefined")return!0;if(!hs.fireEvent(hs,"onKeyDown",a))return!0;var b=hs.getExpander(),c=null;switch(a.keyCode){case 70:return b&&b.doFullExpand(),!0;case 32:c=2;break;case 34:case 39:case 40:c=1;break;case 8:case 33:case 37:case 38:c=-1;break;case 27:case 13:c=0}if(c!==null){hs.removeEventListener(document,window.opera?"keypress":"keydown",hs.keyHandler);if(!hs.enableKeyListener)return!0;a.preventDefault?a.preventDefault():a.returnValue=!1;if(b)return c==0?
|
22
22
|
b.close():c==2?b.slideshow&&b.slideshow.hitSpace():(b.slideshow&&b.slideshow.pause(),hs.previousOrNext(b.key,c)),!1}return!0},registerOverlay:function(a){hs.push(hs.overlays,hs.extend(a,{hsId:"hsId"+hs.idCounter++}))},addSlideshow:function(a){var b=a.slideshowGroup;if(typeof b=="object")for(var c=0;c<b.length;c++){var d={},e;for(e in a)d[e]=a[e];d.slideshowGroup=b[c];hs.push(hs.slideshows,d)}else hs.push(hs.slideshows,a)},getWrapperKey:function(a,b){var c,d=/^highslide-wrapper-([0-9]+)$/;for(c=a;c.parentNode;){if(c.hsKey!==
|
@@ -0,0 +1,3391 @@
|
|
1
|
+
/**
|
2
|
+
* Name: Highslide JS
|
3
|
+
* Version: 4.1.12 (2011-03-28)
|
4
|
+
* Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash
|
5
|
+
* Author: Torstein Hønsi
|
6
|
+
* Support: www.highslide.com/support
|
7
|
+
* License: www.highslide.com/#license
|
8
|
+
*/
|
9
|
+
if (!hs) {
|
10
|
+
var hs = {
|
11
|
+
// Language strings
|
12
|
+
lang : {
|
13
|
+
cssDirection: 'ltr',
|
14
|
+
loadingText : 'Loading...',
|
15
|
+
loadingTitle : 'Click to cancel',
|
16
|
+
focusTitle : 'Click to bring to front',
|
17
|
+
fullExpandTitle : 'Expand to actual size (f)',
|
18
|
+
creditsText : 'Powered by <i>Highslide JS</i>',
|
19
|
+
creditsTitle : 'Go to the Highslide JS homepage',
|
20
|
+
previousText : 'Previous',
|
21
|
+
nextText : 'Next',
|
22
|
+
moveText : 'Move',
|
23
|
+
closeText : 'Close',
|
24
|
+
closeTitle : 'Close (esc)',
|
25
|
+
resizeTitle : 'Resize',
|
26
|
+
playText : 'Play',
|
27
|
+
playTitle : 'Play slideshow (spacebar)',
|
28
|
+
pauseText : 'Pause',
|
29
|
+
pauseTitle : 'Pause slideshow (spacebar)',
|
30
|
+
previousTitle : 'Previous (arrow left)',
|
31
|
+
nextTitle : 'Next (arrow right)',
|
32
|
+
moveTitle : 'Move',
|
33
|
+
fullExpandText : '1:1',
|
34
|
+
number: 'Image %1 of %2',
|
35
|
+
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
|
36
|
+
},
|
37
|
+
// See http://highslide.com/ref for examples of settings
|
38
|
+
graphicsDir : 'highslide/graphics/',
|
39
|
+
expandCursor : 'zoomin.cur', // null disables
|
40
|
+
restoreCursor : 'zoomout.cur', // null disables
|
41
|
+
expandDuration : 250, // milliseconds
|
42
|
+
restoreDuration : 250,
|
43
|
+
marginLeft : 15,
|
44
|
+
marginRight : 15,
|
45
|
+
marginTop : 15,
|
46
|
+
marginBottom : 15,
|
47
|
+
zIndexCounter : 1001, // adjust to other absolutely positioned elements
|
48
|
+
loadingOpacity : 0.75,
|
49
|
+
allowMultipleInstances: true,
|
50
|
+
numberOfImagesToPreload : 5,
|
51
|
+
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
|
52
|
+
outlineStartOffset : 3, // ends at 10
|
53
|
+
padToMinWidth : false, // pad the popup width to make room for wide caption
|
54
|
+
fullExpandPosition : 'bottom right',
|
55
|
+
fullExpandOpacity : 1,
|
56
|
+
showCredits : true, // you can set this to false if you want
|
57
|
+
creditsHref : 'http://highslide.com/',
|
58
|
+
creditsTarget : '_self',
|
59
|
+
enableKeyListener : true,
|
60
|
+
openerTagNames : ['a', 'area'], // Add more to allow slideshow indexing
|
61
|
+
transitions : [],
|
62
|
+
transitionDuration: 250,
|
63
|
+
dimmingOpacity: 0, // Lightbox style dimming background
|
64
|
+
dimmingDuration: 50, // 0 for instant dimming
|
65
|
+
|
66
|
+
allowWidthReduction : false,
|
67
|
+
allowHeightReduction : true,
|
68
|
+
preserveContent : true, // Preserve changes made to the content and position of HTML popups.
|
69
|
+
objectLoadTime : 'before', // Load iframes 'before' or 'after' expansion.
|
70
|
+
cacheAjax : true, // Cache ajax popups for instant display. Can be overridden for each popup.
|
71
|
+
anchor : 'auto', // where the image expands from
|
72
|
+
align : 'auto', // position in the client (overrides anchor)
|
73
|
+
targetX: null, // the id of a target element
|
74
|
+
targetY: null,
|
75
|
+
dragByHeading: true,
|
76
|
+
minWidth: 200,
|
77
|
+
minHeight: 200,
|
78
|
+
allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight
|
79
|
+
outlineType : 'drop-shadow', // set null to disable outlines
|
80
|
+
skin : {
|
81
|
+
controls:
|
82
|
+
'<div class="highslide-controls"><ul>' +
|
83
|
+
'<li class="highslide-previous">' +
|
84
|
+
'<a href="#" title="{hs.lang.previousTitle}">' +
|
85
|
+
'<span>{hs.lang.previousText}</span></a>' +
|
86
|
+
'</li>' +
|
87
|
+
'<li class="highslide-play">' +
|
88
|
+
'<a href="#" title="{hs.lang.playTitle}">' +
|
89
|
+
'<span>{hs.lang.playText}</span></a>' +
|
90
|
+
'</li>' +
|
91
|
+
'<li class="highslide-pause">' +
|
92
|
+
'<a href="#" title="{hs.lang.pauseTitle}">' +
|
93
|
+
'<span>{hs.lang.pauseText}</span></a>' +
|
94
|
+
'</li>' +
|
95
|
+
'<li class="highslide-next">' +
|
96
|
+
'<a href="#" title="{hs.lang.nextTitle}">' +
|
97
|
+
'<span>{hs.lang.nextText}</span></a>' +
|
98
|
+
'</li>' +
|
99
|
+
'<li class="highslide-move">' +
|
100
|
+
'<a href="#" title="{hs.lang.moveTitle}">' +
|
101
|
+
'<span>{hs.lang.moveText}</span></a>' +
|
102
|
+
'</li>' +
|
103
|
+
'<li class="highslide-full-expand">' +
|
104
|
+
'<a href="#" title="{hs.lang.fullExpandTitle}">' +
|
105
|
+
'<span>{hs.lang.fullExpandText}</span></a>' +
|
106
|
+
'</li>' +
|
107
|
+
'<li class="highslide-close">' +
|
108
|
+
'<a href="#" title="{hs.lang.closeTitle}" >' +
|
109
|
+
'<span>{hs.lang.closeText}</span></a>' +
|
110
|
+
'</li>' +
|
111
|
+
'</ul></div>'
|
112
|
+
,
|
113
|
+
contentWrapper:
|
114
|
+
'<div class="highslide-header"><ul>' +
|
115
|
+
'<li class="highslide-previous">' +
|
116
|
+
'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">' +
|
117
|
+
'<span>{hs.lang.previousText}</span></a>' +
|
118
|
+
'</li>' +
|
119
|
+
'<li class="highslide-next">' +
|
120
|
+
'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">' +
|
121
|
+
'<span>{hs.lang.nextText}</span></a>' +
|
122
|
+
'</li>' +
|
123
|
+
'<li class="highslide-move">' +
|
124
|
+
'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">' +
|
125
|
+
'<span>{hs.lang.moveText}</span></a>' +
|
126
|
+
'</li>' +
|
127
|
+
'<li class="highslide-close">' +
|
128
|
+
'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">' +
|
129
|
+
'<span>{hs.lang.closeText}</span></a>' +
|
130
|
+
'</li>' +
|
131
|
+
'</ul></div>' +
|
132
|
+
'<div class="highslide-body"></div>' +
|
133
|
+
'<div class="highslide-footer"><div>' +
|
134
|
+
'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>' +
|
135
|
+
'</div></div>'
|
136
|
+
},
|
137
|
+
// END OF YOUR SETTINGS
|
138
|
+
|
139
|
+
|
140
|
+
// declare internal properties
|
141
|
+
preloadTheseImages : [],
|
142
|
+
continuePreloading: true,
|
143
|
+
expanders : [],
|
144
|
+
overrides : [
|
145
|
+
'allowSizeReduction',
|
146
|
+
'useBox',
|
147
|
+
'anchor',
|
148
|
+
'align',
|
149
|
+
'targetX',
|
150
|
+
'targetY',
|
151
|
+
'outlineType',
|
152
|
+
'outlineWhileAnimating',
|
153
|
+
'captionId',
|
154
|
+
'captionText',
|
155
|
+
'captionEval',
|
156
|
+
'captionOverlay',
|
157
|
+
'headingId',
|
158
|
+
'headingText',
|
159
|
+
'headingEval',
|
160
|
+
'headingOverlay',
|
161
|
+
'creditsPosition',
|
162
|
+
'dragByHeading',
|
163
|
+
'autoplay',
|
164
|
+
'numberPosition',
|
165
|
+
'transitions',
|
166
|
+
'dimmingOpacity',
|
167
|
+
|
168
|
+
'width',
|
169
|
+
'height',
|
170
|
+
|
171
|
+
'contentId',
|
172
|
+
'allowWidthReduction',
|
173
|
+
'allowHeightReduction',
|
174
|
+
'preserveContent',
|
175
|
+
'maincontentId',
|
176
|
+
'maincontentText',
|
177
|
+
'maincontentEval',
|
178
|
+
'objectType',
|
179
|
+
'cacheAjax',
|
180
|
+
'objectWidth',
|
181
|
+
'objectHeight',
|
182
|
+
'objectLoadTime',
|
183
|
+
'swfOptions',
|
184
|
+
'wrapperClassName',
|
185
|
+
'minWidth',
|
186
|
+
'minHeight',
|
187
|
+
'maxWidth',
|
188
|
+
'maxHeight',
|
189
|
+
'pageOrigin',
|
190
|
+
'slideshowGroup',
|
191
|
+
'easing',
|
192
|
+
'easingClose',
|
193
|
+
'fadeInOut',
|
194
|
+
'src'
|
195
|
+
],
|
196
|
+
overlays : [],
|
197
|
+
idCounter : 0,
|
198
|
+
oPos : {
|
199
|
+
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
|
200
|
+
y: ['above', 'top', 'middle', 'bottom', 'below']
|
201
|
+
},
|
202
|
+
mouse: {},
|
203
|
+
headingOverlay: {},
|
204
|
+
captionOverlay: {},
|
205
|
+
swfOptions: { flashvars: {}, params: {}, attributes: {} },
|
206
|
+
timers : [],
|
207
|
+
|
208
|
+
slideshows : [],
|
209
|
+
|
210
|
+
pendingOutlines : {},
|
211
|
+
sleeping : [],
|
212
|
+
preloadTheseAjax : [],
|
213
|
+
cacheBindings : [],
|
214
|
+
cachedGets : {},
|
215
|
+
clones : {},
|
216
|
+
onReady: [],
|
217
|
+
uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
|
218
|
+
parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0,'0'])[1]),
|
219
|
+
ie : (document.all && !window.opera),
|
220
|
+
//ie : navigator && /MSIE [678]/.test(navigator.userAgent), // ie9 compliant?
|
221
|
+
safari : /Safari/.test(navigator.userAgent),
|
222
|
+
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
|
223
|
+
|
224
|
+
$ : function (id) {
|
225
|
+
if (id) return document.getElementById(id);
|
226
|
+
},
|
227
|
+
|
228
|
+
push : function (arr, val) {
|
229
|
+
arr[arr.length] = val;
|
230
|
+
},
|
231
|
+
|
232
|
+
createElement : function (tag, attribs, styles, parent, nopad) {
|
233
|
+
var el = document.createElement(tag);
|
234
|
+
if (attribs) hs.extend(el, attribs);
|
235
|
+
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
|
236
|
+
if (styles) hs.setStyles(el, styles);
|
237
|
+
if (parent) parent.appendChild(el);
|
238
|
+
return el;
|
239
|
+
},
|
240
|
+
|
241
|
+
extend : function (el, attribs) {
|
242
|
+
for (var x in attribs) el[x] = attribs[x];
|
243
|
+
return el;
|
244
|
+
},
|
245
|
+
|
246
|
+
setStyles : function (el, styles) {
|
247
|
+
for (var x in styles) {
|
248
|
+
if (hs.ieLt9 && x == 'opacity') {
|
249
|
+
if (styles[x] > 0.99) el.style.removeAttribute('filter');
|
250
|
+
else el.style.filter = 'alpha(opacity=' + (styles[x] * 100) + ')';
|
251
|
+
}
|
252
|
+
else el.style[x] = styles[x];
|
253
|
+
}
|
254
|
+
},
|
255
|
+
animate: function(el, prop, opt) {
|
256
|
+
var start,
|
257
|
+
end,
|
258
|
+
unit;
|
259
|
+
if (typeof opt != 'object' || opt === null) {
|
260
|
+
var args = arguments;
|
261
|
+
opt = {
|
262
|
+
duration: args[2],
|
263
|
+
easing: args[3],
|
264
|
+
complete: args[4]
|
265
|
+
};
|
266
|
+
}
|
267
|
+
if (typeof opt.duration != 'number') opt.duration = 250;
|
268
|
+
opt.easing = Math[opt.easing] || Math.easeInQuad;
|
269
|
+
opt.curAnim = hs.extend({}, prop);
|
270
|
+
for (var name in prop) {
|
271
|
+
var e = new hs.fx(el, opt, name);
|
272
|
+
|
273
|
+
start = parseFloat(hs.css(el, name)) || 0;
|
274
|
+
end = parseFloat(prop[name]);
|
275
|
+
unit = name != 'opacity' ? 'px' : '';
|
276
|
+
|
277
|
+
e.custom(start, end, unit);
|
278
|
+
}
|
279
|
+
},
|
280
|
+
css: function(el, prop) {
|
281
|
+
if (el.style[prop]) {
|
282
|
+
return el.style[prop];
|
283
|
+
} else if (document.defaultView) {
|
284
|
+
return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
|
285
|
+
|
286
|
+
} else {
|
287
|
+
if (prop == 'opacity') prop = 'filter';
|
288
|
+
var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b) {
|
289
|
+
return b.toUpperCase();
|
290
|
+
})];
|
291
|
+
if (prop == 'filter')
|
292
|
+
val = val.replace(/alpha\(opacity=([0-9]+)\)/,
|
293
|
+
function (a, b) {
|
294
|
+
return b / 100
|
295
|
+
});
|
296
|
+
return val === '' ? 1 : val;
|
297
|
+
}
|
298
|
+
},
|
299
|
+
|
300
|
+
getPageSize : function () {
|
301
|
+
var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
|
302
|
+
? d.documentElement : d.body;
|
303
|
+
|
304
|
+
var width = hs.ieLt9 ? iebody.clientWidth :
|
305
|
+
(d.documentElement.clientWidth || self.innerWidth),
|
306
|
+
height = hs.ieLt9 ? iebody.clientHeight : self.innerHeight;
|
307
|
+
|
308
|
+
hs.page = {
|
309
|
+
width: width,
|
310
|
+
height: height,
|
311
|
+
scrollLeft: hs.ieLt9 ? iebody.scrollLeft : pageXOffset,
|
312
|
+
scrollTop: hs.ieLt9 ? iebody.scrollTop : pageYOffset
|
313
|
+
};
|
314
|
+
return hs.page;
|
315
|
+
},
|
316
|
+
|
317
|
+
getPosition : function(el) {
|
318
|
+
if (/area/i.test(el.tagName)) {
|
319
|
+
var imgs = document.getElementsByTagName('img');
|
320
|
+
for (var i = 0; i < imgs.length; i++) {
|
321
|
+
var u = imgs[i].useMap;
|
322
|
+
if (u && u.replace(/^.*?#/, '') == el.parentNode.name) {
|
323
|
+
el = imgs[i];
|
324
|
+
break;
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
var p = { x: el.offsetLeft, y: el.offsetTop };
|
329
|
+
while (el.offsetParent) {
|
330
|
+
el = el.offsetParent;
|
331
|
+
p.x += el.offsetLeft;
|
332
|
+
p.y += el.offsetTop;
|
333
|
+
if (el != document.body && el != document.documentElement) {
|
334
|
+
p.x -= el.scrollLeft;
|
335
|
+
p.y -= el.scrollTop;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
return p;
|
339
|
+
},
|
340
|
+
|
341
|
+
expand : function(a, params, custom, type) {
|
342
|
+
if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
|
343
|
+
if (typeof a.getParams == 'function') return params;
|
344
|
+
if (type == 'html') {
|
345
|
+
for (var i = 0; i < hs.sleeping.length; i++) {
|
346
|
+
if (hs.sleeping[i] && hs.sleeping[i].a == a) {
|
347
|
+
hs.sleeping[i].awake();
|
348
|
+
hs.sleeping[i] = null;
|
349
|
+
return false;
|
350
|
+
}
|
351
|
+
}
|
352
|
+
hs.hasHtmlExpanders = true;
|
353
|
+
}
|
354
|
+
try {
|
355
|
+
new hs.Expander(a, params, custom, type);
|
356
|
+
return false;
|
357
|
+
} catch (e) {
|
358
|
+
return true;
|
359
|
+
}
|
360
|
+
},
|
361
|
+
|
362
|
+
htmlExpand : function(a, params, custom) {
|
363
|
+
return hs.expand(a, params, custom, 'html');
|
364
|
+
},
|
365
|
+
|
366
|
+
getSelfRendered : function() {
|
367
|
+
return hs.createElement('div', {
|
368
|
+
className: 'highslide-html-content',
|
369
|
+
innerHTML: hs.replaceLang(hs.skin.contentWrapper)
|
370
|
+
});
|
371
|
+
},
|
372
|
+
getElementByClass : function (el, tagName, className) {
|
373
|
+
var els = el.getElementsByTagName(tagName);
|
374
|
+
for (var i = 0; i < els.length; i++) {
|
375
|
+
if ((new RegExp(className)).test(els[i].className)) {
|
376
|
+
return els[i];
|
377
|
+
}
|
378
|
+
}
|
379
|
+
return null;
|
380
|
+
},
|
381
|
+
replaceLang : function(s) {
|
382
|
+
s = s.replace(/\s/g, ' ');
|
383
|
+
var re = /{hs\.lang\.([^}]+)\}/g,
|
384
|
+
matches = s.match(re),
|
385
|
+
lang;
|
386
|
+
if (matches) for (var i = 0; i < matches.length; i++) {
|
387
|
+
lang = matches[i].replace(re, "$1");
|
388
|
+
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
|
389
|
+
}
|
390
|
+
return s;
|
391
|
+
},
|
392
|
+
|
393
|
+
|
394
|
+
setClickEvents : function () {
|
395
|
+
var els = document.getElementsByTagName('a');
|
396
|
+
for (var i = 0; i < els.length; i++) {
|
397
|
+
var type = hs.isUnobtrusiveAnchor(els[i]);
|
398
|
+
if (type && !els[i].hsHasSetClick) {
|
399
|
+
(function() {
|
400
|
+
var t = type;
|
401
|
+
if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) {
|
402
|
+
els[i].onclick = (type == 'image') ? function() {
|
403
|
+
return hs.expand(this)
|
404
|
+
} :
|
405
|
+
function() {
|
406
|
+
return hs.htmlExpand(this, { objectType: t });
|
407
|
+
};
|
408
|
+
}
|
409
|
+
})();
|
410
|
+
els[i].hsHasSetClick = true;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
hs.getAnchors();
|
414
|
+
},
|
415
|
+
isUnobtrusiveAnchor: function(el) {
|
416
|
+
if (el.rel == 'highslide') return 'image';
|
417
|
+
else if (el.rel == 'highslide-ajax') return 'ajax';
|
418
|
+
else if (el.rel == 'highslide-iframe') return 'iframe';
|
419
|
+
else if (el.rel == 'highslide-swf') return 'swf';
|
420
|
+
},
|
421
|
+
|
422
|
+
getCacheBinding : function (a) {
|
423
|
+
for (var i = 0; i < hs.cacheBindings.length; i++) {
|
424
|
+
if (hs.cacheBindings[i][0] == a) {
|
425
|
+
var c = hs.cacheBindings[i][1];
|
426
|
+
hs.cacheBindings[i][1] = c.cloneNode(1);
|
427
|
+
return c;
|
428
|
+
}
|
429
|
+
}
|
430
|
+
return null;
|
431
|
+
},
|
432
|
+
|
433
|
+
preloadAjax : function (e) {
|
434
|
+
var arr = hs.getAnchors();
|
435
|
+
for (var i = 0; i < arr.htmls.length; i++) {
|
436
|
+
var a = arr.htmls[i];
|
437
|
+
if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax'))
|
438
|
+
hs.push(hs.preloadTheseAjax, a);
|
439
|
+
}
|
440
|
+
|
441
|
+
hs.preloadAjaxElement(0);
|
442
|
+
},
|
443
|
+
|
444
|
+
preloadAjaxElement : function (i) {
|
445
|
+
if (!hs.preloadTheseAjax[i]) return;
|
446
|
+
var a = hs.preloadTheseAjax[i];
|
447
|
+
var cache = hs.getNode(hs.getParam(a, 'contentId'));
|
448
|
+
if (!cache) cache = hs.getSelfRendered();
|
449
|
+
var ajax = new hs.Ajax(a, cache, 1);
|
450
|
+
ajax.onError = function () {
|
451
|
+
};
|
452
|
+
ajax.onLoad = function () {
|
453
|
+
hs.push(hs.cacheBindings, [a, cache]);
|
454
|
+
hs.preloadAjaxElement(i + 1);
|
455
|
+
};
|
456
|
+
ajax.run();
|
457
|
+
},
|
458
|
+
|
459
|
+
focusTopmost : function() {
|
460
|
+
var topZ = 0,
|
461
|
+
topmostKey = -1,
|
462
|
+
expanders = hs.expanders,
|
463
|
+
exp,
|
464
|
+
zIndex;
|
465
|
+
for (var i = 0; i < expanders.length; i++) {
|
466
|
+
exp = expanders[i];
|
467
|
+
if (exp) {
|
468
|
+
zIndex = exp.wrapper.style.zIndex;
|
469
|
+
if (zIndex && zIndex > topZ) {
|
470
|
+
topZ = zIndex;
|
471
|
+
topmostKey = i;
|
472
|
+
}
|
473
|
+
}
|
474
|
+
}
|
475
|
+
if (topmostKey == -1) hs.focusKey = -1;
|
476
|
+
else expanders[topmostKey].focus();
|
477
|
+
},
|
478
|
+
|
479
|
+
getParam : function (a, param) {
|
480
|
+
a.getParams = a.onclick;
|
481
|
+
var p = a.getParams ? a.getParams() : null;
|
482
|
+
a.getParams = null;
|
483
|
+
|
484
|
+
return (p && typeof p[param] != 'undefined') ? p[param] :
|
485
|
+
(typeof hs[param] != 'undefined' ? hs[param] : null);
|
486
|
+
},
|
487
|
+
|
488
|
+
getSrc : function (a) {
|
489
|
+
var src = hs.getParam(a, 'src');
|
490
|
+
if (src) return src;
|
491
|
+
return a.href;
|
492
|
+
},
|
493
|
+
|
494
|
+
getNode : function (id) {
|
495
|
+
var node = hs.$(id), clone = hs.clones[id], a = {};
|
496
|
+
if (!node && !clone) return null;
|
497
|
+
if (!clone) {
|
498
|
+
clone = node.cloneNode(true);
|
499
|
+
clone.id = '';
|
500
|
+
hs.clones[id] = clone;
|
501
|
+
return node;
|
502
|
+
} else {
|
503
|
+
return clone.cloneNode(true);
|
504
|
+
}
|
505
|
+
},
|
506
|
+
|
507
|
+
discardElement : function(d) {
|
508
|
+
if (d) hs.garbageBin.appendChild(d);
|
509
|
+
hs.garbageBin.innerHTML = '';
|
510
|
+
},
|
511
|
+
dim : function(exp) {
|
512
|
+
if (!hs.dimmer) {
|
513
|
+
isNew = true;
|
514
|
+
hs.dimmer = hs.createElement('div', {
|
515
|
+
className: 'highslide-dimming highslide-viewport-size',
|
516
|
+
owner: '',
|
517
|
+
onclick: function() {
|
518
|
+
if (hs.fireEvent(hs, 'onDimmerClick'))
|
519
|
+
|
520
|
+
hs.close();
|
521
|
+
}
|
522
|
+
}, {
|
523
|
+
visibility: 'visible',
|
524
|
+
opacity: 0
|
525
|
+
}, hs.container, true);
|
526
|
+
}
|
527
|
+
hs.dimmer.style.display = '';
|
528
|
+
|
529
|
+
var isNew = hs.dimmer.owner == '';
|
530
|
+
hs.dimmer.owner += '|' + exp.key;
|
531
|
+
|
532
|
+
if (isNew) {
|
533
|
+
if (hs.geckoMac && hs.dimmingGeckoFix)
|
534
|
+
hs.setStyles(hs.dimmer, {
|
535
|
+
background: 'url(' + hs.graphicsDir + 'geckodimmer.png)',
|
536
|
+
opacity: 1
|
537
|
+
});
|
538
|
+
else
|
539
|
+
hs.animate(hs.dimmer, { opacity: exp.dimmingOpacity }, hs.dimmingDuration);
|
540
|
+
}
|
541
|
+
},
|
542
|
+
undim : function(key) {
|
543
|
+
if (!hs.dimmer) return;
|
544
|
+
if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|' + key, '');
|
545
|
+
|
546
|
+
if (
|
547
|
+
(typeof key != 'undefined' && hs.dimmer.owner != '')
|
548
|
+
|| (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity'))
|
549
|
+
) return;
|
550
|
+
|
551
|
+
if (hs.geckoMac && hs.dimmingGeckoFix) hs.dimmer.style.display = 'none';
|
552
|
+
else hs.animate(hs.dimmer, { opacity: 0 }, hs.dimmingDuration, null, function() {
|
553
|
+
hs.dimmer.style.display = 'none';
|
554
|
+
});
|
555
|
+
},
|
556
|
+
transit : function (adj, exp) {
|
557
|
+
var last = exp || hs.getExpander();
|
558
|
+
exp = last;
|
559
|
+
if (hs.upcoming) return false;
|
560
|
+
else hs.last = last;
|
561
|
+
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
|
562
|
+
try {
|
563
|
+
hs.upcoming = adj;
|
564
|
+
adj.onclick();
|
565
|
+
} catch (e) {
|
566
|
+
hs.last = hs.upcoming = null;
|
567
|
+
}
|
568
|
+
try {
|
569
|
+
if (!adj || exp.transitions[1] != 'crossfade')
|
570
|
+
exp.close();
|
571
|
+
} catch (e) {
|
572
|
+
}
|
573
|
+
return false;
|
574
|
+
},
|
575
|
+
|
576
|
+
previousOrNext : function (el, op) {
|
577
|
+
var exp = hs.getExpander(el);
|
578
|
+
if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
|
579
|
+
else return false;
|
580
|
+
},
|
581
|
+
|
582
|
+
previous : function (el) {
|
583
|
+
return hs.previousOrNext(el, -1);
|
584
|
+
},
|
585
|
+
|
586
|
+
next : function (el) {
|
587
|
+
return hs.previousOrNext(el, 1);
|
588
|
+
},
|
589
|
+
|
590
|
+
keyHandler : function(e) {
|
591
|
+
if (!e) e = window.event;
|
592
|
+
if (!e.target) e.target = e.srcElement; // ie
|
593
|
+
if (typeof e.target.form != 'undefined') return true; // form element has focus
|
594
|
+
if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
|
595
|
+
var exp = hs.getExpander();
|
596
|
+
|
597
|
+
var op = null;
|
598
|
+
switch (e.keyCode) {
|
599
|
+
case 70: // f
|
600
|
+
if (exp) exp.doFullExpand();
|
601
|
+
return true;
|
602
|
+
case 32: // Space
|
603
|
+
op = 2;
|
604
|
+
break;
|
605
|
+
case 34: // Page Down
|
606
|
+
case 39: // Arrow right
|
607
|
+
case 40: // Arrow down
|
608
|
+
op = 1;
|
609
|
+
break;
|
610
|
+
case 8: // Backspace
|
611
|
+
case 33: // Page Up
|
612
|
+
case 37: // Arrow left
|
613
|
+
case 38: // Arrow up
|
614
|
+
op = -1;
|
615
|
+
break;
|
616
|
+
case 27: // Escape
|
617
|
+
case 13: // Enter
|
618
|
+
op = 0;
|
619
|
+
}
|
620
|
+
if (op !== null) {
|
621
|
+
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
|
622
|
+
if (!hs.enableKeyListener) return true;
|
623
|
+
|
624
|
+
if (e.preventDefault) e.preventDefault();
|
625
|
+
else e.returnValue = false;
|
626
|
+
if (exp) {
|
627
|
+
if (op == 0) {
|
628
|
+
exp.close();
|
629
|
+
} else if (op == 2) {
|
630
|
+
if (exp.slideshow) exp.slideshow.hitSpace();
|
631
|
+
} else {
|
632
|
+
if (exp.slideshow) exp.slideshow.pause();
|
633
|
+
hs.previousOrNext(exp.key, op);
|
634
|
+
}
|
635
|
+
return false;
|
636
|
+
}
|
637
|
+
}
|
638
|
+
return true;
|
639
|
+
},
|
640
|
+
|
641
|
+
|
642
|
+
registerOverlay : function (overlay) {
|
643
|
+
hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId' + hs.idCounter++ }));
|
644
|
+
},
|
645
|
+
|
646
|
+
|
647
|
+
addSlideshow : function (options) {
|
648
|
+
var sg = options.slideshowGroup;
|
649
|
+
if (typeof sg == 'object') {
|
650
|
+
for (var i = 0; i < sg.length; i++) {
|
651
|
+
var o = {};
|
652
|
+
for (var x in options) o[x] = options[x];
|
653
|
+
o.slideshowGroup = sg[i];
|
654
|
+
hs.push(hs.slideshows, o);
|
655
|
+
}
|
656
|
+
} else {
|
657
|
+
hs.push(hs.slideshows, options);
|
658
|
+
}
|
659
|
+
},
|
660
|
+
|
661
|
+
getWrapperKey : function (element, expOnly) {
|
662
|
+
var el, re = /^highslide-wrapper-([0-9]+)$/;
|
663
|
+
// 1. look in open expanders
|
664
|
+
el = element;
|
665
|
+
while (el.parentNode) {
|
666
|
+
if (el.hsKey !== undefined) return el.hsKey;
|
667
|
+
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
|
668
|
+
el = el.parentNode;
|
669
|
+
}
|
670
|
+
// 2. look in thumbnail
|
671
|
+
if (!expOnly) {
|
672
|
+
el = element;
|
673
|
+
while (el.parentNode) {
|
674
|
+
if (el.tagName && hs.isHsAnchor(el)) {
|
675
|
+
for (var key = 0; key < hs.expanders.length; key++) {
|
676
|
+
var exp = hs.expanders[key];
|
677
|
+
if (exp && exp.a == el) return key;
|
678
|
+
}
|
679
|
+
}
|
680
|
+
el = el.parentNode;
|
681
|
+
}
|
682
|
+
}
|
683
|
+
return null;
|
684
|
+
},
|
685
|
+
|
686
|
+
getExpander : function (el, expOnly) {
|
687
|
+
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
|
688
|
+
if (typeof el == 'number') return hs.expanders[el] || null;
|
689
|
+
if (typeof el == 'string') el = hs.$(el);
|
690
|
+
return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
|
691
|
+
},
|
692
|
+
|
693
|
+
isHsAnchor : function (a) {
|
694
|
+
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
|
695
|
+
},
|
696
|
+
|
697
|
+
reOrder : function () {
|
698
|
+
for (var i = 0; i < hs.expanders.length; i++)
|
699
|
+
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
|
700
|
+
},
|
701
|
+
fireEvent : function (obj, evt, args) {
|
702
|
+
return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true;
|
703
|
+
},
|
704
|
+
|
705
|
+
mouseClickHandler : function(e) {
|
706
|
+
if (!e) e = window.event;
|
707
|
+
if (e.button > 1) return true;
|
708
|
+
if (!e.target) e.target = e.srcElement;
|
709
|
+
|
710
|
+
var el = e.target;
|
711
|
+
while (el.parentNode
|
712
|
+
&& !(/highslide-(image|move|html|resize)/.test(el.className))) {
|
713
|
+
el = el.parentNode;
|
714
|
+
}
|
715
|
+
var exp = hs.getExpander(el);
|
716
|
+
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
|
717
|
+
|
718
|
+
if (exp && e.type == 'mousedown') {
|
719
|
+
if (e.target.form) return true;
|
720
|
+
var match = el.className.match(/highslide-(image|move|resize)/);
|
721
|
+
if (match) {
|
722
|
+
hs.dragArgs = {
|
723
|
+
exp: exp ,
|
724
|
+
type: match[1],
|
725
|
+
left: exp.x.pos,
|
726
|
+
width: exp.x.size,
|
727
|
+
top: exp.y.pos,
|
728
|
+
height: exp.y.size,
|
729
|
+
clickX: e.clientX,
|
730
|
+
clickY: e.clientY
|
731
|
+
};
|
732
|
+
|
733
|
+
|
734
|
+
hs.addEventListener(document, 'mousemove', hs.dragHandler);
|
735
|
+
if (e.preventDefault) e.preventDefault(); // FF
|
736
|
+
|
737
|
+
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
|
738
|
+
exp.focus();
|
739
|
+
hs.hasFocused = true;
|
740
|
+
}
|
741
|
+
return false;
|
742
|
+
}
|
743
|
+
else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) {
|
744
|
+
exp.focus();
|
745
|
+
exp.doShowHide('hidden');
|
746
|
+
}
|
747
|
+
} else if (e.type == 'mouseup') {
|
748
|
+
|
749
|
+
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
|
750
|
+
|
751
|
+
if (hs.dragArgs) {
|
752
|
+
if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
|
753
|
+
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
|
754
|
+
var hasDragged = hs.dragArgs.hasDragged;
|
755
|
+
|
756
|
+
if (!hasDragged && !hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
|
757
|
+
if (hs.fireEvent(exp, 'onImageClick'))
|
758
|
+
exp.close();
|
759
|
+
}
|
760
|
+
else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
|
761
|
+
hs.dragArgs.exp.doShowHide('hidden');
|
762
|
+
}
|
763
|
+
|
764
|
+
if (hs.dragArgs.exp.releaseMask)
|
765
|
+
hs.dragArgs.exp.releaseMask.style.display = 'none';
|
766
|
+
|
767
|
+
if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs);
|
768
|
+
hs.hasFocused = false;
|
769
|
+
hs.dragArgs = null;
|
770
|
+
|
771
|
+
} else if (/highslide-image-blur/.test(el.className)) {
|
772
|
+
el.style.cursor = hs.styleRestoreCursor;
|
773
|
+
}
|
774
|
+
}
|
775
|
+
return false;
|
776
|
+
},
|
777
|
+
|
778
|
+
dragHandler : function(e) {
|
779
|
+
if (!hs.dragArgs) return true;
|
780
|
+
if (!e) e = window.event;
|
781
|
+
var a = hs.dragArgs, exp = a.exp;
|
782
|
+
if (exp.iframe) {
|
783
|
+
if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null,
|
784
|
+
{ position: 'absolute', width: exp.x.size + 'px', height: exp.y.size + 'px',
|
785
|
+
left: exp.x.cb + 'px', top: exp.y.cb + 'px', zIndex: 4, background: (hs.ieLt9 ? 'white' : 'none'),
|
786
|
+
opacity: 0.01 },
|
787
|
+
exp.wrapper, true);
|
788
|
+
if (exp.releaseMask.style.display == 'none')
|
789
|
+
exp.releaseMask.style.display = '';
|
790
|
+
}
|
791
|
+
|
792
|
+
a.dX = e.clientX - a.clickX;
|
793
|
+
a.dY = e.clientY - a.clickY;
|
794
|
+
|
795
|
+
var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
|
796
|
+
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|
797
|
+
|| (distance > (hs.dragSensitivity || 5));
|
798
|
+
|
799
|
+
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
|
800
|
+
if (!hs.fireEvent(exp, 'onDrag', a)) return false;
|
801
|
+
|
802
|
+
if (a.type == 'resize') exp.resize(a);
|
803
|
+
else {
|
804
|
+
exp.moveTo(a.left + a.dX, a.top + a.dY);
|
805
|
+
if (a.type == 'image') exp.content.style.cursor = 'move';
|
806
|
+
}
|
807
|
+
}
|
808
|
+
return false;
|
809
|
+
},
|
810
|
+
|
811
|
+
wrapperMouseHandler : function (e) {
|
812
|
+
try {
|
813
|
+
if (!e) e = window.event;
|
814
|
+
var over = /mouseover/i.test(e.type);
|
815
|
+
if (!e.target) e.target = e.srcElement; // ie
|
816
|
+
if (!e.relatedTarget) e.relatedTarget =
|
817
|
+
over ? e.fromElement : e.toElement; // ie
|
818
|
+
var exp = hs.getExpander(e.target);
|
819
|
+
if (!exp.isExpanded) return;
|
820
|
+
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
|
821
|
+
|| hs.dragArgs) return;
|
822
|
+
hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e);
|
823
|
+
for (var i = 0; i < exp.overlays.length; i++) (function() {
|
824
|
+
var o = hs.$('hsId' + exp.overlays[i]);
|
825
|
+
if (o && o.hideOnMouseOut) {
|
826
|
+
if (over) hs.setStyles(o, { visibility: 'visible', display: '' });
|
827
|
+
hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
|
828
|
+
}
|
829
|
+
})();
|
830
|
+
} catch (e) {
|
831
|
+
}
|
832
|
+
},
|
833
|
+
addEventListener : function (el, event, func) {
|
834
|
+
if (el == document && event == 'ready') {
|
835
|
+
hs.push(hs.onReady, func);
|
836
|
+
}
|
837
|
+
try {
|
838
|
+
el.addEventListener(event, func, false);
|
839
|
+
} catch (e) {
|
840
|
+
try {
|
841
|
+
el.detachEvent('on' + event, func);
|
842
|
+
el.attachEvent('on' + event, func);
|
843
|
+
} catch (e) {
|
844
|
+
el['on' + event] = func;
|
845
|
+
}
|
846
|
+
}
|
847
|
+
},
|
848
|
+
|
849
|
+
removeEventListener : function (el, event, func) {
|
850
|
+
try {
|
851
|
+
el.removeEventListener(event, func, false);
|
852
|
+
} catch (e) {
|
853
|
+
try {
|
854
|
+
el.detachEvent('on' + event, func);
|
855
|
+
} catch (e) {
|
856
|
+
el['on' + event] = null;
|
857
|
+
}
|
858
|
+
}
|
859
|
+
},
|
860
|
+
|
861
|
+
preloadFullImage : function (i) {
|
862
|
+
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
|
863
|
+
var img = document.createElement('img');
|
864
|
+
img.onload = function() {
|
865
|
+
img = null;
|
866
|
+
hs.preloadFullImage(i + 1);
|
867
|
+
};
|
868
|
+
img.src = hs.preloadTheseImages[i];
|
869
|
+
}
|
870
|
+
},
|
871
|
+
preloadImages : function (number) {
|
872
|
+
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
|
873
|
+
|
874
|
+
var arr = hs.getAnchors();
|
875
|
+
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
|
876
|
+
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
|
877
|
+
}
|
878
|
+
|
879
|
+
// preload outlines
|
880
|
+
if (hs.outlineType) new hs.Outline(hs.outlineType, function () {
|
881
|
+
hs.preloadFullImage(0)
|
882
|
+
});
|
883
|
+
else
|
884
|
+
|
885
|
+
hs.preloadFullImage(0);
|
886
|
+
|
887
|
+
// preload cursor
|
888
|
+
if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
|
889
|
+
},
|
890
|
+
|
891
|
+
|
892
|
+
init : function () {
|
893
|
+
if (!hs.container) {
|
894
|
+
|
895
|
+
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
|
896
|
+
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
|
897
|
+
|
898
|
+
hs.getPageSize();
|
899
|
+
hs.ie6SSL = hs.ieLt7 && location.protocol == 'https:';
|
900
|
+
for (var x in hs.langDefaults) {
|
901
|
+
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
|
902
|
+
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
|
903
|
+
hs.lang[x] = hs.langDefaults[x];
|
904
|
+
}
|
905
|
+
|
906
|
+
hs.container = hs.createElement('div', {
|
907
|
+
className: 'highslide-container'
|
908
|
+
}, {
|
909
|
+
position: 'absolute',
|
910
|
+
left: 0,
|
911
|
+
top: 0,
|
912
|
+
width: '100%',
|
913
|
+
zIndex: hs.zIndexCounter,
|
914
|
+
direction: 'ltr'
|
915
|
+
},
|
916
|
+
document.body,
|
917
|
+
true
|
918
|
+
);
|
919
|
+
hs.loading = hs.createElement('a', {
|
920
|
+
className: 'highslide-loading',
|
921
|
+
title: hs.lang.loadingTitle,
|
922
|
+
innerHTML: hs.lang.loadingText,
|
923
|
+
href: 'javascript:;'
|
924
|
+
}, {
|
925
|
+
position: 'absolute',
|
926
|
+
top: '-9999px',
|
927
|
+
opacity: hs.loadingOpacity,
|
928
|
+
zIndex: 1
|
929
|
+
}, hs.container
|
930
|
+
);
|
931
|
+
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
|
932
|
+
hs.viewport = hs.createElement('div', {
|
933
|
+
className: 'highslide-viewport highslide-viewport-size'
|
934
|
+
}, {
|
935
|
+
visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
|
936
|
+
}, hs.container, 1
|
937
|
+
);
|
938
|
+
hs.clearing = hs.createElement('div', null,
|
939
|
+
{ clear: 'both', paddingTop: '1px' }, null, true);
|
940
|
+
|
941
|
+
// http://www.robertpenner.com/easing/
|
942
|
+
Math.linearTween = function (t, b, c, d) {
|
943
|
+
return c * t / d + b;
|
944
|
+
};
|
945
|
+
Math.easeInQuad = function (t, b, c, d) {
|
946
|
+
return c * (t /= d) * t + b;
|
947
|
+
};
|
948
|
+
Math.easeOutQuad = function (t, b, c, d) {
|
949
|
+
return -c * (t /= d) * (t - 2) + b;
|
950
|
+
};
|
951
|
+
|
952
|
+
hs.hideSelects = hs.ieLt7;
|
953
|
+
hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
|
954
|
+
|| (hs.ieLt7 && hs.uaVersion < 5.5));
|
955
|
+
hs.fireEvent(this, 'onActivate');
|
956
|
+
}
|
957
|
+
},
|
958
|
+
ready : function() {
|
959
|
+
if (hs.isReady) return;
|
960
|
+
hs.isReady = true;
|
961
|
+
for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
|
962
|
+
},
|
963
|
+
|
964
|
+
updateAnchors : function() {
|
965
|
+
var el, els, all = [], images = [], htmls = [],groups = {}, re;
|
966
|
+
|
967
|
+
for (var i = 0; i < hs.openerTagNames.length; i++) {
|
968
|
+
els = document.getElementsByTagName(hs.openerTagNames[i]);
|
969
|
+
for (var j = 0; j < els.length; j++) {
|
970
|
+
el = els[j];
|
971
|
+
re = hs.isHsAnchor(el);
|
972
|
+
if (re) {
|
973
|
+
hs.push(all, el);
|
974
|
+
if (re[0] == 'hs.expand') hs.push(images, el);
|
975
|
+
else if (re[0] == 'hs.htmlExpand') hs.push(htmls, el);
|
976
|
+
var g = hs.getParam(el, 'slideshowGroup') || 'none';
|
977
|
+
if (!groups[g]) groups[g] = [];
|
978
|
+
hs.push(groups[g], el);
|
979
|
+
}
|
980
|
+
}
|
981
|
+
}
|
982
|
+
hs.anchors = { all: all, groups: groups, images: images, htmls: htmls };
|
983
|
+
return hs.anchors;
|
984
|
+
|
985
|
+
},
|
986
|
+
|
987
|
+
getAnchors : function() {
|
988
|
+
return hs.anchors || hs.updateAnchors();
|
989
|
+
},
|
990
|
+
|
991
|
+
|
992
|
+
close : function(el) {
|
993
|
+
var exp = hs.getExpander(el);
|
994
|
+
if (exp) exp.close();
|
995
|
+
return false;
|
996
|
+
}
|
997
|
+
}; // end hs object
|
998
|
+
hs.fx = function(elem, options, prop) {
|
999
|
+
this.options = options;
|
1000
|
+
this.elem = elem;
|
1001
|
+
this.prop = prop;
|
1002
|
+
|
1003
|
+
if (!options.orig) options.orig = {};
|
1004
|
+
};
|
1005
|
+
hs.fx.prototype = {
|
1006
|
+
update: function() {
|
1007
|
+
(hs.fx.step[this.prop] || hs.fx.step._default)(this);
|
1008
|
+
|
1009
|
+
if (this.options.step)
|
1010
|
+
this.options.step.call(this.elem, this.now, this);
|
1011
|
+
|
1012
|
+
},
|
1013
|
+
custom: function(from, to, unit) {
|
1014
|
+
this.startTime = (new Date()).getTime();
|
1015
|
+
this.start = from;
|
1016
|
+
this.end = to;
|
1017
|
+
this.unit = unit;// || this.unit || "px";
|
1018
|
+
this.now = this.start;
|
1019
|
+
this.pos = this.state = 0;
|
1020
|
+
|
1021
|
+
var self = this;
|
1022
|
+
|
1023
|
+
function t(gotoEnd) {
|
1024
|
+
return self.step(gotoEnd);
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
t.elem = this.elem;
|
1028
|
+
|
1029
|
+
if (t() && hs.timers.push(t) == 1) {
|
1030
|
+
hs.timerId = setInterval(function() {
|
1031
|
+
var timers = hs.timers;
|
1032
|
+
|
1033
|
+
for (var i = 0; i < timers.length; i++)
|
1034
|
+
if (!timers[i]())
|
1035
|
+
timers.splice(i--, 1);
|
1036
|
+
|
1037
|
+
if (!timers.length) {
|
1038
|
+
clearInterval(hs.timerId);
|
1039
|
+
}
|
1040
|
+
}, 13);
|
1041
|
+
}
|
1042
|
+
},
|
1043
|
+
step: function(gotoEnd) {
|
1044
|
+
var t = (new Date()).getTime();
|
1045
|
+
if (gotoEnd || t >= this.options.duration + this.startTime) {
|
1046
|
+
this.now = this.end;
|
1047
|
+
this.pos = this.state = 1;
|
1048
|
+
this.update();
|
1049
|
+
|
1050
|
+
this.options.curAnim[ this.prop ] = true;
|
1051
|
+
|
1052
|
+
var done = true;
|
1053
|
+
for (var i in this.options.curAnim)
|
1054
|
+
if (this.options.curAnim[i] !== true)
|
1055
|
+
done = false;
|
1056
|
+
|
1057
|
+
if (done) {
|
1058
|
+
if (this.options.complete) this.options.complete.call(this.elem);
|
1059
|
+
}
|
1060
|
+
return false;
|
1061
|
+
} else {
|
1062
|
+
var n = t - this.startTime;
|
1063
|
+
this.state = n / this.options.duration;
|
1064
|
+
this.pos = this.options.easing(n, 0, 1, this.options.duration);
|
1065
|
+
this.now = this.start + ((this.end - this.start) * this.pos);
|
1066
|
+
this.update();
|
1067
|
+
}
|
1068
|
+
return true;
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
};
|
1072
|
+
|
1073
|
+
hs.extend(hs.fx, {
|
1074
|
+
step: {
|
1075
|
+
|
1076
|
+
opacity: function(fx) {
|
1077
|
+
hs.setStyles(fx.elem, { opacity: fx.now });
|
1078
|
+
},
|
1079
|
+
|
1080
|
+
_default: function(fx) {
|
1081
|
+
try {
|
1082
|
+
if (fx.elem.style && fx.elem.style[ fx.prop ] != null)
|
1083
|
+
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
|
1084
|
+
else
|
1085
|
+
fx.elem[ fx.prop ] = fx.now;
|
1086
|
+
} catch (e) {
|
1087
|
+
}
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
});
|
1091
|
+
|
1092
|
+
hs.Outline = function (outlineType, onLoad) {
|
1093
|
+
this.onLoad = onLoad;
|
1094
|
+
this.outlineType = outlineType;
|
1095
|
+
var v = hs.uaVersion, tr;
|
1096
|
+
|
1097
|
+
this.hasAlphaImageLoader = hs.ie && hs.uaVersion < 7;
|
1098
|
+
if (!outlineType) {
|
1099
|
+
if (onLoad) onLoad();
|
1100
|
+
return;
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
hs.init();
|
1104
|
+
this.table = hs.createElement(
|
1105
|
+
'table', {
|
1106
|
+
cellSpacing: 0
|
1107
|
+
}, {
|
1108
|
+
visibility: 'hidden',
|
1109
|
+
position: 'absolute',
|
1110
|
+
borderCollapse: 'collapse',
|
1111
|
+
width: 0
|
1112
|
+
},
|
1113
|
+
hs.container,
|
1114
|
+
true
|
1115
|
+
);
|
1116
|
+
var tbody = hs.createElement('tbody', null, null, this.table, 1);
|
1117
|
+
|
1118
|
+
this.td = [];
|
1119
|
+
for (var i = 0; i <= 8; i++) {
|
1120
|
+
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
|
1121
|
+
this.td[i] = hs.createElement('td', null, null, tr, true);
|
1122
|
+
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
|
1123
|
+
hs.setStyles(this.td[i], style);
|
1124
|
+
}
|
1125
|
+
this.td[4].className = outlineType + ' highslide-outline';
|
1126
|
+
|
1127
|
+
this.preloadGraphic();
|
1128
|
+
};
|
1129
|
+
|
1130
|
+
hs.Outline.prototype = {
|
1131
|
+
preloadGraphic : function () {
|
1132
|
+
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/") + this.outlineType + ".png";
|
1133
|
+
|
1134
|
+
var appendTo = hs.safari && hs.uaVersion < 525 ? hs.container : null;
|
1135
|
+
this.graphic = hs.createElement('img', null, { position: 'absolute',
|
1136
|
+
top: '-9999px' }, appendTo, true); // for onload trigger
|
1137
|
+
|
1138
|
+
var pThis = this;
|
1139
|
+
this.graphic.onload = function() {
|
1140
|
+
pThis.onGraphicLoad();
|
1141
|
+
};
|
1142
|
+
|
1143
|
+
this.graphic.src = src;
|
1144
|
+
},
|
1145
|
+
|
1146
|
+
onGraphicLoad : function () {
|
1147
|
+
var o = this.offset = this.graphic.width / 4,
|
1148
|
+
pos = [
|
1149
|
+
[0,0],
|
1150
|
+
[0,-4],
|
1151
|
+
[-2,0],
|
1152
|
+
[0,-8],
|
1153
|
+
0,
|
1154
|
+
[-2,-8],
|
1155
|
+
[0,-2],
|
1156
|
+
[0,-6],
|
1157
|
+
[-2,-2]
|
1158
|
+
],
|
1159
|
+
dim = { height: (2 * o) + 'px', width: (2 * o) + 'px' };
|
1160
|
+
for (var i = 0; i <= 8; i++) {
|
1161
|
+
if (pos[i]) {
|
1162
|
+
if (this.hasAlphaImageLoader) {
|
1163
|
+
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width + 'px';
|
1164
|
+
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
|
1165
|
+
hs.createElement('div', null, {
|
1166
|
+
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='" + this.graphic.src + "')",
|
1167
|
+
position: 'absolute',
|
1168
|
+
width: w,
|
1169
|
+
height: this.graphic.height + 'px',
|
1170
|
+
left: (pos[i][0] * o) + 'px',
|
1171
|
+
top: (pos[i][1] * o) + 'px'
|
1172
|
+
},
|
1173
|
+
div,
|
1174
|
+
true);
|
1175
|
+
} else {
|
1176
|
+
hs.setStyles(this.td[i], { background: 'url(' + this.graphic.src + ') ' + (pos[i][0] * o) + 'px ' + (pos[i][1] * o) + 'px'});
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
if (window.opera && (i == 3 || i == 5))
|
1180
|
+
hs.createElement('div', null, dim, this.td[i], true);
|
1181
|
+
|
1182
|
+
hs.setStyles(this.td[i], dim);
|
1183
|
+
}
|
1184
|
+
}
|
1185
|
+
this.graphic = null;
|
1186
|
+
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
|
1187
|
+
hs.pendingOutlines[this.outlineType] = this;
|
1188
|
+
if (this.onLoad) this.onLoad();
|
1189
|
+
},
|
1190
|
+
|
1191
|
+
setPosition : function (pos, offset, vis, dur, easing) {
|
1192
|
+
var exp = this.exp,
|
1193
|
+
stl = exp.wrapper.style,
|
1194
|
+
offset = offset || 0,
|
1195
|
+
pos = pos || {
|
1196
|
+
x: exp.x.pos + offset,
|
1197
|
+
y: exp.y.pos + offset,
|
1198
|
+
w: exp.x.get('wsize') - 2 * offset,
|
1199
|
+
h: exp.y.get('wsize') - 2 * offset
|
1200
|
+
};
|
1201
|
+
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
|
1202
|
+
? 'visible' : 'hidden';
|
1203
|
+
hs.setStyles(this.table, {
|
1204
|
+
left: (pos.x - this.offset) + 'px',
|
1205
|
+
top: (pos.y - this.offset) + 'px',
|
1206
|
+
width: (pos.w + 2 * this.offset) + 'px'
|
1207
|
+
});
|
1208
|
+
|
1209
|
+
pos.w -= 2 * this.offset;
|
1210
|
+
pos.h -= 2 * this.offset;
|
1211
|
+
hs.setStyles(this.td[4], {
|
1212
|
+
width: pos.w >= 0 ? pos.w + 'px' : 0,
|
1213
|
+
height: pos.h >= 0 ? pos.h + 'px' : 0
|
1214
|
+
});
|
1215
|
+
if (this.hasAlphaImageLoader) this.td[3].style.height
|
1216
|
+
= this.td[5].style.height = this.td[4].style.height;
|
1217
|
+
|
1218
|
+
},
|
1219
|
+
|
1220
|
+
destroy : function(hide) {
|
1221
|
+
if (hide) this.table.style.visibility = 'hidden';
|
1222
|
+
else hs.discardElement(this.table);
|
1223
|
+
}
|
1224
|
+
};
|
1225
|
+
|
1226
|
+
hs.Dimension = function(exp, dim) {
|
1227
|
+
this.exp = exp;
|
1228
|
+
this.dim = dim;
|
1229
|
+
this.ucwh = dim == 'x' ? 'Width' : 'Height';
|
1230
|
+
this.wh = this.ucwh.toLowerCase();
|
1231
|
+
this.uclt = dim == 'x' ? 'Left' : 'Top';
|
1232
|
+
this.lt = this.uclt.toLowerCase();
|
1233
|
+
this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
|
1234
|
+
this.rb = this.ucrb.toLowerCase();
|
1235
|
+
this.p1 = this.p2 = 0;
|
1236
|
+
};
|
1237
|
+
hs.Dimension.prototype = {
|
1238
|
+
get : function(key) {
|
1239
|
+
switch (key) {
|
1240
|
+
case 'loadingPos':
|
1241
|
+
return this.tpos + this.tb + (this.t - hs.loading['offset' + this.ucwh]) / 2;
|
1242
|
+
case 'loadingPosXfade':
|
1243
|
+
return this.pos + this.cb + this.p1 + (this.size - hs.loading['offset' + this.ucwh]) / 2;
|
1244
|
+
case 'wsize':
|
1245
|
+
return this.size + 2 * this.cb + this.p1 + this.p2;
|
1246
|
+
case 'fitsize':
|
1247
|
+
return this.clientSize - this.marginMin - this.marginMax;
|
1248
|
+
case 'maxsize':
|
1249
|
+
return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2;
|
1250
|
+
case 'opos':
|
1251
|
+
return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
|
1252
|
+
case 'osize':
|
1253
|
+
return this.get('wsize') + (this.exp.outline ? 2 * this.exp.outline.offset : 0);
|
1254
|
+
case 'imgPad':
|
1255
|
+
return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;
|
1256
|
+
|
1257
|
+
}
|
1258
|
+
},
|
1259
|
+
calcBorders: function() {
|
1260
|
+
// correct for borders
|
1261
|
+
this.cb = (this.exp.content['offset' + this.ucwh] - this.t) / 2;
|
1262
|
+
|
1263
|
+
this.marginMax = hs['margin' + this.ucrb];
|
1264
|
+
},
|
1265
|
+
calcThumb: function() {
|
1266
|
+
this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
|
1267
|
+
this.exp.el['offset' + this.ucwh];
|
1268
|
+
this.tpos = this.exp.tpos[this.dim];
|
1269
|
+
this.tb = (this.exp.el['offset' + this.ucwh] - this.t) / 2;
|
1270
|
+
if (this.tpos == 0 || this.tpos == -1) {
|
1271
|
+
this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll' + this.uclt];
|
1272
|
+
}
|
1273
|
+
;
|
1274
|
+
},
|
1275
|
+
calcExpanded: function() {
|
1276
|
+
var exp = this.exp;
|
1277
|
+
this.justify = 'auto';
|
1278
|
+
|
1279
|
+
// get alignment
|
1280
|
+
if (exp.align == 'center') this.justify = 'center';
|
1281
|
+
else if (new RegExp(this.lt).test(exp.anchor)) this.justify = null;
|
1282
|
+
else if (new RegExp(this.rb).test(exp.anchor)) this.justify = 'max';
|
1283
|
+
|
1284
|
+
|
1285
|
+
// size and position
|
1286
|
+
this.pos = this.tpos - this.cb + this.tb;
|
1287
|
+
|
1288
|
+
if (this.maxHeight && this.dim == 'x')
|
1289
|
+
exp.maxWidth = Math.min(exp.maxWidth || this.full, exp.maxHeight * this.full / exp.y.full);
|
1290
|
+
|
1291
|
+
this.size = Math.min(this.full, exp['max' + this.ucwh] || this.full);
|
1292
|
+
this.minSize = exp.allowSizeReduction ?
|
1293
|
+
Math.min(exp['min' + this.ucwh], this.full) : this.full;
|
1294
|
+
if (exp.isImage && exp.useBox) {
|
1295
|
+
this.size = exp[this.wh];
|
1296
|
+
this.imgSize = this.full;
|
1297
|
+
}
|
1298
|
+
if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
|
1299
|
+
this.target = exp['target' + this.dim.toUpperCase()];
|
1300
|
+
this.marginMin = hs['margin' + this.uclt];
|
1301
|
+
this.scroll = hs.page['scroll' + this.uclt];
|
1302
|
+
this.clientSize = hs.page[this.wh];
|
1303
|
+
},
|
1304
|
+
setSize: function(i) {
|
1305
|
+
var exp = this.exp;
|
1306
|
+
if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
|
1307
|
+
this.imgSize = i;
|
1308
|
+
this.size = Math.max(this.size, this.imgSize);
|
1309
|
+
exp.content.style[this.lt] = this.get('imgPad') + 'px';
|
1310
|
+
} else
|
1311
|
+
this.size = i;
|
1312
|
+
|
1313
|
+
exp.content.style[this.wh] = i + 'px';
|
1314
|
+
exp.wrapper.style[this.wh] = this.get('wsize') + 'px';
|
1315
|
+
if (exp.outline) exp.outline.setPosition();
|
1316
|
+
if (exp.releaseMask) exp.releaseMask.style[this.wh] = i + 'px';
|
1317
|
+
if (this.dim == 'y' && exp.iDoc && exp.body.style.height != 'auto') try {
|
1318
|
+
exp.iDoc.body.style.overflow = 'auto';
|
1319
|
+
} catch (e) {
|
1320
|
+
}
|
1321
|
+
if (exp.isHtml) {
|
1322
|
+
var d = exp.scrollerDiv;
|
1323
|
+
if (this.sizeDiff === undefined)
|
1324
|
+
this.sizeDiff = exp.innerContent['offset' + this.ucwh] - d['offset' + this.ucwh];
|
1325
|
+
d.style[this.wh] = (this.size - this.sizeDiff) + 'px';
|
1326
|
+
|
1327
|
+
if (this.dim == 'x') exp.mediumContent.style.width = 'auto';
|
1328
|
+
if (exp.body) exp.body.style[this.wh] = 'auto';
|
1329
|
+
}
|
1330
|
+
if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
|
1331
|
+
if (this.dim == 'x' && exp.slideshow && exp.isImage) {
|
1332
|
+
if (i == this.full) exp.slideshow.disable('full-expand');
|
1333
|
+
else exp.slideshow.enable('full-expand');
|
1334
|
+
}
|
1335
|
+
},
|
1336
|
+
setPos: function(i) {
|
1337
|
+
this.pos = i;
|
1338
|
+
this.exp.wrapper.style[this.lt] = i + 'px';
|
1339
|
+
|
1340
|
+
if (this.exp.outline) this.exp.outline.setPosition();
|
1341
|
+
|
1342
|
+
}
|
1343
|
+
};
|
1344
|
+
|
1345
|
+
hs.Expander = function(a, params, custom, contentType) {
|
1346
|
+
if (document.readyState && hs.ie && !hs.isReady) {
|
1347
|
+
hs.addEventListener(document, 'ready', function() {
|
1348
|
+
new hs.Expander(a, params, custom, contentType);
|
1349
|
+
});
|
1350
|
+
return;
|
1351
|
+
}
|
1352
|
+
this.a = a;
|
1353
|
+
this.custom = custom;
|
1354
|
+
this.contentType = contentType || 'image';
|
1355
|
+
this.isHtml = (contentType == 'html');
|
1356
|
+
this.isImage = !this.isHtml;
|
1357
|
+
|
1358
|
+
hs.continuePreloading = false;
|
1359
|
+
this.overlays = [];
|
1360
|
+
this.last = hs.last;
|
1361
|
+
hs.last = null;
|
1362
|
+
hs.init();
|
1363
|
+
var key = this.key = hs.expanders.length;
|
1364
|
+
// override inline parameters
|
1365
|
+
for (var i = 0; i < hs.overrides.length; i++) {
|
1366
|
+
var name = hs.overrides[i];
|
1367
|
+
this[name] = params && typeof params[name] != 'undefined' ?
|
1368
|
+
params[name] : hs[name];
|
1369
|
+
}
|
1370
|
+
if (!this.src) this.src = a.href;
|
1371
|
+
|
1372
|
+
// get thumb
|
1373
|
+
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
|
1374
|
+
el = this.thumb = el.getElementsByTagName('img')[0] || el;
|
1375
|
+
this.thumbsUserSetId = el.id || a.id;
|
1376
|
+
if (!hs.fireEvent(this, 'onInit')) return true;
|
1377
|
+
|
1378
|
+
// check if already open
|
1379
|
+
for (var i = 0; i < hs.expanders.length; i++) {
|
1380
|
+
if (hs.expanders[i] && hs.expanders[i].a == a
|
1381
|
+
&& !(this.last && this.transitions[1] == 'crossfade')) {
|
1382
|
+
hs.expanders[i].focus();
|
1383
|
+
return false;
|
1384
|
+
}
|
1385
|
+
}
|
1386
|
+
|
1387
|
+
// cancel other
|
1388
|
+
if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
|
1389
|
+
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
|
1390
|
+
hs.expanders[i].cancelLoading();
|
1391
|
+
}
|
1392
|
+
}
|
1393
|
+
hs.expanders[key] = this;
|
1394
|
+
if (!hs.allowMultipleInstances && !hs.upcoming) {
|
1395
|
+
if (hs.expanders[key - 1]) hs.expanders[key - 1].close();
|
1396
|
+
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
|
1397
|
+
hs.expanders[hs.focusKey].close();
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
// initiate metrics
|
1401
|
+
this.el = el;
|
1402
|
+
this.tpos = this.pageOrigin || hs.getPosition(el);
|
1403
|
+
hs.getPageSize();
|
1404
|
+
var x = this.x = new hs.Dimension(this, 'x');
|
1405
|
+
x.calcThumb();
|
1406
|
+
var y = this.y = new hs.Dimension(this, 'y');
|
1407
|
+
y.calcThumb();
|
1408
|
+
if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el);
|
1409
|
+
this.wrapper = hs.createElement(
|
1410
|
+
'div', {
|
1411
|
+
id: 'highslide-wrapper-' + this.key,
|
1412
|
+
className: 'highslide-wrapper ' + this.wrapperClassName
|
1413
|
+
}, {
|
1414
|
+
visibility: 'hidden',
|
1415
|
+
position: 'absolute',
|
1416
|
+
zIndex: hs.zIndexCounter += 2
|
1417
|
+
}, null, true);
|
1418
|
+
|
1419
|
+
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
|
1420
|
+
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
|
1421
|
+
this.outlineWhileAnimating = 0;
|
1422
|
+
|
1423
|
+
// get the outline
|
1424
|
+
if (!this.outlineType
|
1425
|
+
|| (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
|
1426
|
+
this[this.contentType + 'Create']();
|
1427
|
+
|
1428
|
+
} else if (hs.pendingOutlines[this.outlineType]) {
|
1429
|
+
this.connectOutline();
|
1430
|
+
this[this.contentType + 'Create']();
|
1431
|
+
|
1432
|
+
} else {
|
1433
|
+
this.showLoading();
|
1434
|
+
var exp = this;
|
1435
|
+
new hs.Outline(this.outlineType,
|
1436
|
+
function () {
|
1437
|
+
exp.connectOutline();
|
1438
|
+
exp[exp.contentType + 'Create']();
|
1439
|
+
}
|
1440
|
+
);
|
1441
|
+
}
|
1442
|
+
return true;
|
1443
|
+
};
|
1444
|
+
|
1445
|
+
hs.Expander.prototype = {
|
1446
|
+
error : function(e) {
|
1447
|
+
if (hs.debug) alert('Line ' + e.lineNumber + ': ' + e.message);
|
1448
|
+
else window.location.href = this.src;
|
1449
|
+
},
|
1450
|
+
|
1451
|
+
connectOutline : function() {
|
1452
|
+
var outline = this.outline = hs.pendingOutlines[this.outlineType];
|
1453
|
+
outline.exp = this;
|
1454
|
+
outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
|
1455
|
+
hs.pendingOutlines[this.outlineType] = null;
|
1456
|
+
},
|
1457
|
+
|
1458
|
+
showLoading : function() {
|
1459
|
+
if (this.onLoadStarted || this.loading) return;
|
1460
|
+
|
1461
|
+
this.loading = hs.loading;
|
1462
|
+
var exp = this;
|
1463
|
+
this.loading.onclick = function() {
|
1464
|
+
exp.cancelLoading();
|
1465
|
+
};
|
1466
|
+
|
1467
|
+
|
1468
|
+
if (!hs.fireEvent(this, 'onShowLoading')) return;
|
1469
|
+
var exp = this,
|
1470
|
+
l = this.x.get('loadingPos') + 'px',
|
1471
|
+
t = this.y.get('loadingPos') + 'px';
|
1472
|
+
if (!tgt && this.last && this.transitions[1] == 'crossfade')
|
1473
|
+
var tgt = this.last;
|
1474
|
+
if (tgt) {
|
1475
|
+
l = tgt.x.get('loadingPosXfade') + 'px';
|
1476
|
+
t = tgt.y.get('loadingPosXfade') + 'px';
|
1477
|
+
this.loading.style.zIndex = hs.zIndexCounter++;
|
1478
|
+
}
|
1479
|
+
setTimeout(function () {
|
1480
|
+
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })
|
1481
|
+
}
|
1482
|
+
, 100);
|
1483
|
+
},
|
1484
|
+
|
1485
|
+
imageCreate : function() {
|
1486
|
+
var exp = this;
|
1487
|
+
|
1488
|
+
var img = document.createElement('img');
|
1489
|
+
this.content = img;
|
1490
|
+
img.onload = function () {
|
1491
|
+
if (hs.expanders[exp.key]) exp.contentLoaded();
|
1492
|
+
};
|
1493
|
+
if (hs.blockRightClick) img.oncontextmenu = function() {
|
1494
|
+
return false;
|
1495
|
+
};
|
1496
|
+
img.className = 'highslide-image';
|
1497
|
+
hs.setStyles(img, {
|
1498
|
+
visibility: 'hidden',
|
1499
|
+
display: 'block',
|
1500
|
+
position: 'absolute',
|
1501
|
+
maxWidth: '9999px',
|
1502
|
+
zIndex: 3
|
1503
|
+
});
|
1504
|
+
img.title = hs.lang.restoreTitle;
|
1505
|
+
if (hs.safari && hs.uaVersion < 525) hs.container.appendChild(img);
|
1506
|
+
if (hs.ie && hs.flushImgSize) img.src = null;
|
1507
|
+
img.src = this.src;
|
1508
|
+
|
1509
|
+
this.showLoading();
|
1510
|
+
},
|
1511
|
+
|
1512
|
+
htmlCreate : function () {
|
1513
|
+
if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
|
1514
|
+
|
1515
|
+
this.content = hs.getCacheBinding(this.a);
|
1516
|
+
if (!this.content)
|
1517
|
+
this.content = hs.getNode(this.contentId);
|
1518
|
+
if (!this.content)
|
1519
|
+
this.content = hs.getSelfRendered();
|
1520
|
+
this.getInline(['maincontent']);
|
1521
|
+
if (this.maincontent) {
|
1522
|
+
var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
|
1523
|
+
if (body) body.appendChild(this.maincontent);
|
1524
|
+
this.maincontent.style.display = 'block';
|
1525
|
+
}
|
1526
|
+
hs.fireEvent(this, 'onAfterGetContent');
|
1527
|
+
|
1528
|
+
var innerContent = this.innerContent = this.content;
|
1529
|
+
|
1530
|
+
if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(innerContent);
|
1531
|
+
|
1532
|
+
// the content tree
|
1533
|
+
hs.container.appendChild(this.wrapper);
|
1534
|
+
hs.setStyles(this.wrapper, {
|
1535
|
+
position: 'static',
|
1536
|
+
padding: '0 ' + hs.marginRight + 'px 0 ' + hs.marginLeft + 'px'
|
1537
|
+
});
|
1538
|
+
this.content = hs.createElement(
|
1539
|
+
'div', {
|
1540
|
+
className: 'highslide-html'
|
1541
|
+
}, {
|
1542
|
+
position: 'relative',
|
1543
|
+
zIndex: 3,
|
1544
|
+
height: 0,
|
1545
|
+
overflow: 'hidden'
|
1546
|
+
},
|
1547
|
+
this.wrapper
|
1548
|
+
);
|
1549
|
+
this.mediumContent = hs.createElement('div', null, null, this.content, 1);
|
1550
|
+
this.mediumContent.appendChild(innerContent);
|
1551
|
+
|
1552
|
+
hs.setStyles(innerContent, {
|
1553
|
+
position: 'relative',
|
1554
|
+
display: 'block',
|
1555
|
+
direction: hs.lang.cssDirection || ''
|
1556
|
+
});
|
1557
|
+
if (this.width) innerContent.style.width = this.width + 'px';
|
1558
|
+
if (this.height) hs.setStyles(innerContent, {
|
1559
|
+
height: this.height + 'px',
|
1560
|
+
overflow: 'hidden'
|
1561
|
+
});
|
1562
|
+
if (innerContent.offsetWidth < this.minWidth)
|
1563
|
+
innerContent.style.width = this.minWidth + 'px';
|
1564
|
+
|
1565
|
+
|
1566
|
+
if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) {
|
1567
|
+
this.showLoading();
|
1568
|
+
var exp = this;
|
1569
|
+
var ajax = new hs.Ajax(this.a, innerContent);
|
1570
|
+
ajax.src = this.src;
|
1571
|
+
ajax.onLoad = function () {
|
1572
|
+
if (hs.expanders[exp.key]) exp.contentLoaded();
|
1573
|
+
};
|
1574
|
+
ajax.onError = function () {
|
1575
|
+
location.href = exp.src;
|
1576
|
+
};
|
1577
|
+
ajax.run();
|
1578
|
+
}
|
1579
|
+
else
|
1580
|
+
|
1581
|
+
if (this.objectType == 'iframe' && this.objectLoadTime == 'before') {
|
1582
|
+
this.writeExtendedContent();
|
1583
|
+
}
|
1584
|
+
else
|
1585
|
+
this.contentLoaded();
|
1586
|
+
},
|
1587
|
+
|
1588
|
+
contentLoaded : function() {
|
1589
|
+
try {
|
1590
|
+
if (!this.content) return;
|
1591
|
+
this.content.onload = null;
|
1592
|
+
if (this.onLoadStarted) return;
|
1593
|
+
else this.onLoadStarted = true;
|
1594
|
+
|
1595
|
+
var x = this.x, y = this.y;
|
1596
|
+
|
1597
|
+
if (this.loading) {
|
1598
|
+
hs.setStyles(this.loading, { top: '-9999px' });
|
1599
|
+
this.loading = null;
|
1600
|
+
hs.fireEvent(this, 'onHideLoading');
|
1601
|
+
}
|
1602
|
+
if (this.isImage) {
|
1603
|
+
x.full = this.content.width;
|
1604
|
+
y.full = this.content.height;
|
1605
|
+
|
1606
|
+
hs.setStyles(this.content, {
|
1607
|
+
width: x.t + 'px',
|
1608
|
+
height: y.t + 'px'
|
1609
|
+
});
|
1610
|
+
this.wrapper.appendChild(this.content);
|
1611
|
+
hs.container.appendChild(this.wrapper);
|
1612
|
+
} else if (this.htmlGetSize) this.htmlGetSize();
|
1613
|
+
|
1614
|
+
x.calcBorders();
|
1615
|
+
y.calcBorders();
|
1616
|
+
|
1617
|
+
hs.setStyles(this.wrapper, {
|
1618
|
+
left: (x.tpos + x.tb - x.cb) + 'px',
|
1619
|
+
top: (y.tpos + x.tb - y.cb) + 'px'
|
1620
|
+
});
|
1621
|
+
|
1622
|
+
|
1623
|
+
this.initSlideshow();
|
1624
|
+
this.getOverlays();
|
1625
|
+
|
1626
|
+
var ratio = x.full / y.full;
|
1627
|
+
x.calcExpanded();
|
1628
|
+
this.justify(x);
|
1629
|
+
|
1630
|
+
y.calcExpanded();
|
1631
|
+
this.justify(y);
|
1632
|
+
if (this.isHtml) this.htmlSizeOperations();
|
1633
|
+
if (this.overlayBox) this.sizeOverlayBox(0, 1);
|
1634
|
+
|
1635
|
+
|
1636
|
+
if (this.allowSizeReduction) {
|
1637
|
+
if (this.isImage)
|
1638
|
+
this.correctRatio(ratio);
|
1639
|
+
else this.fitOverlayBox();
|
1640
|
+
var ss = this.slideshow;
|
1641
|
+
if (ss && this.last && ss.controls && ss.fixedControls) {
|
1642
|
+
var pos = ss.overlayOptions.position || '', p;
|
1643
|
+
for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
|
1644
|
+
p = this[dim];
|
1645
|
+
if (pos.match(hs.oPos[dim][i])) {
|
1646
|
+
p.pos = this.last[dim].pos
|
1647
|
+
+ (this.last[dim].p1 - p.p1)
|
1648
|
+
+ (this.last[dim].size - p.size) * [0, 0, .5, 1, 1][i];
|
1649
|
+
if (ss.fixedControls == 'fit') {
|
1650
|
+
if (p.pos + p.size + p.p1 + p.p2 > p.scroll + p.clientSize - p.marginMax)
|
1651
|
+
p.pos = p.scroll + p.clientSize - p.size - p.marginMin - p.marginMax - p.p1 - p.p2;
|
1652
|
+
if (p.pos < p.scroll + p.marginMin) p.pos = p.scroll + p.marginMin;
|
1653
|
+
}
|
1654
|
+
}
|
1655
|
+
}
|
1656
|
+
}
|
1657
|
+
if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
|
1658
|
+
this.createFullExpand();
|
1659
|
+
if (this.overlays.length == 1) this.sizeOverlayBox();
|
1660
|
+
}
|
1661
|
+
}
|
1662
|
+
this.show();
|
1663
|
+
|
1664
|
+
} catch (e) {
|
1665
|
+
this.error(e);
|
1666
|
+
}
|
1667
|
+
},
|
1668
|
+
|
1669
|
+
|
1670
|
+
setObjContainerSize : function(parent, auto) {
|
1671
|
+
var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
|
1672
|
+
if (/(iframe|swf)/.test(this.objectType)) {
|
1673
|
+
if (this.objectWidth) c.style.width = this.objectWidth + 'px';
|
1674
|
+
if (this.objectHeight) c.style.height = this.objectHeight + 'px';
|
1675
|
+
}
|
1676
|
+
},
|
1677
|
+
|
1678
|
+
writeExtendedContent : function () {
|
1679
|
+
if (this.hasExtendedContent) return;
|
1680
|
+
var exp = this;
|
1681
|
+
this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
|
1682
|
+
if (this.objectType == 'iframe') {
|
1683
|
+
this.showLoading();
|
1684
|
+
var ruler = hs.clearing.cloneNode(1);
|
1685
|
+
this.body.appendChild(ruler);
|
1686
|
+
this.newWidth = this.innerContent.offsetWidth;
|
1687
|
+
if (!this.objectWidth) this.objectWidth = ruler.offsetWidth;
|
1688
|
+
var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight,
|
1689
|
+
h = this.objectHeight || hs.page.height - hDiff - hs.marginTop - hs.marginBottom,
|
1690
|
+
onload = this.objectLoadTime == 'before' ?
|
1691
|
+
' onload="if (hs.expanders[' + this.key + ']) hs.expanders[' + this.key + '].contentLoaded()" ' : '';
|
1692
|
+
this.body.innerHTML += '<iframe name="hs' + (new Date()).getTime() + '" frameborder="0" key="' + this.key + '" '
|
1693
|
+
+ ' style="width:' + this.objectWidth + 'px; height:' + h + 'px" '
|
1694
|
+
+ onload + ' src="' + this.src + '" ></iframe>';
|
1695
|
+
this.ruler = this.body.getElementsByTagName('div')[0];
|
1696
|
+
this.iframe = this.body.getElementsByTagName('iframe')[0];
|
1697
|
+
|
1698
|
+
if (this.objectLoadTime == 'after') this.correctIframeSize();
|
1699
|
+
|
1700
|
+
}
|
1701
|
+
if (this.objectType == 'swf') {
|
1702
|
+
this.body.id = this.body.id || 'hs-flash-id-' + this.key;
|
1703
|
+
var a = this.swfOptions;
|
1704
|
+
if (!a.params) a.params = {};
|
1705
|
+
if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent';
|
1706
|
+
if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight,
|
1707
|
+
a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes);
|
1708
|
+
}
|
1709
|
+
this.hasExtendedContent = true;
|
1710
|
+
},
|
1711
|
+
htmlGetSize : function() {
|
1712
|
+
if (this.iframe && !this.objectHeight) { // loadtime before
|
1713
|
+
this.iframe.style.height = this.body.style.height = this.getIframePageHeight() + 'px';
|
1714
|
+
}
|
1715
|
+
this.innerContent.appendChild(hs.clearing);
|
1716
|
+
if (!this.x.full) this.x.full = this.innerContent.offsetWidth;
|
1717
|
+
this.y.full = this.innerContent.offsetHeight;
|
1718
|
+
this.innerContent.removeChild(hs.clearing);
|
1719
|
+
if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) { // ie css bug
|
1720
|
+
this.newHeight = parseInt(this.innerContent.currentStyle.height);
|
1721
|
+
}
|
1722
|
+
hs.setStyles(this.wrapper, { position: 'absolute', padding: '0'});
|
1723
|
+
hs.setStyles(this.content, { width: this.x.t + 'px', height: this.y.t + 'px'});
|
1724
|
+
|
1725
|
+
},
|
1726
|
+
|
1727
|
+
getIframePageHeight : function() {
|
1728
|
+
var h;
|
1729
|
+
try {
|
1730
|
+
var doc = this.iDoc = this.iframe.contentDocument || this.iframe.contentWindow.document;
|
1731
|
+
var clearing = doc.createElement('div');
|
1732
|
+
clearing.style.clear = 'both';
|
1733
|
+
doc.body.appendChild(clearing);
|
1734
|
+
h = clearing.offsetTop;
|
1735
|
+
if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop)
|
1736
|
+
+ parseInt(doc.body.currentStyle.marginBottom) - 1;
|
1737
|
+
} catch (e) { // other domain
|
1738
|
+
h = 300;
|
1739
|
+
}
|
1740
|
+
return h;
|
1741
|
+
},
|
1742
|
+
correctIframeSize : function () {
|
1743
|
+
var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth;
|
1744
|
+
hs.discardElement(this.ruler);
|
1745
|
+
if (wDiff < 0) wDiff = 0;
|
1746
|
+
|
1747
|
+
var hDiff = this.innerContent.offsetHeight - this.iframe.offsetHeight;
|
1748
|
+
if (this.iDoc && !this.objectHeight && !this.height && this.y.size == this.y.full) try {
|
1749
|
+
this.iDoc.body.style.overflow = 'hidden';
|
1750
|
+
} catch (e) {
|
1751
|
+
}
|
1752
|
+
hs.setStyles(this.iframe, {
|
1753
|
+
width: Math.abs(this.x.size - wDiff) + 'px',
|
1754
|
+
height: Math.abs(this.y.size - hDiff) + 'px'
|
1755
|
+
});
|
1756
|
+
hs.setStyles(this.body, {
|
1757
|
+
width: this.iframe.style.width,
|
1758
|
+
height: this.iframe.style.height
|
1759
|
+
});
|
1760
|
+
|
1761
|
+
this.scrollingContent = this.iframe;
|
1762
|
+
this.scrollerDiv = this.scrollingContent;
|
1763
|
+
|
1764
|
+
},
|
1765
|
+
htmlSizeOperations : function () {
|
1766
|
+
|
1767
|
+
this.setObjContainerSize(this.innerContent);
|
1768
|
+
|
1769
|
+
|
1770
|
+
if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent();
|
1771
|
+
|
1772
|
+
// handle minimum size
|
1773
|
+
if (this.x.size < this.x.full && !this.allowWidthReduction) this.x.size = this.x.full;
|
1774
|
+
if (this.y.size < this.y.full && !this.allowHeightReduction) this.y.size = this.y.full;
|
1775
|
+
this.scrollerDiv = this.innerContent;
|
1776
|
+
hs.setStyles(this.mediumContent, {
|
1777
|
+
position: 'relative',
|
1778
|
+
width: this.x.size + 'px'
|
1779
|
+
});
|
1780
|
+
hs.setStyles(this.innerContent, {
|
1781
|
+
border: 'none',
|
1782
|
+
width: 'auto',
|
1783
|
+
height: 'auto'
|
1784
|
+
});
|
1785
|
+
var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
|
1786
|
+
if (node && !/(iframe|swf)/.test(this.objectType)) {
|
1787
|
+
var cNode = node; // wrap to get true size
|
1788
|
+
node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true);
|
1789
|
+
cNode.parentNode.insertBefore(node, cNode);
|
1790
|
+
node.appendChild(hs.clearing); // IE6
|
1791
|
+
node.appendChild(cNode);
|
1792
|
+
|
1793
|
+
var wDiff = this.innerContent.offsetWidth - node.offsetWidth;
|
1794
|
+
var hDiff = this.innerContent.offsetHeight - node.offsetHeight;
|
1795
|
+
node.removeChild(hs.clearing);
|
1796
|
+
|
1797
|
+
var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0; // KDE repainting bug
|
1798
|
+
hs.setStyles(node, {
|
1799
|
+
width: (this.x.size - wDiff - kdeBugCorr) + 'px',
|
1800
|
+
height: (this.y.size - hDiff) + 'px',
|
1801
|
+
overflow: 'auto',
|
1802
|
+
position: 'relative'
|
1803
|
+
}
|
1804
|
+
);
|
1805
|
+
if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight) {
|
1806
|
+
node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px';
|
1807
|
+
}
|
1808
|
+
this.scrollingContent = node;
|
1809
|
+
this.scrollerDiv = this.scrollingContent;
|
1810
|
+
}
|
1811
|
+
if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize();
|
1812
|
+
if (!this.scrollingContent && this.y.size < this.mediumContent.offsetHeight) this.scrollerDiv = this.content;
|
1813
|
+
|
1814
|
+
if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) {
|
1815
|
+
this.x.size += 17; // room for scrollbars
|
1816
|
+
}
|
1817
|
+
if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) {
|
1818
|
+
setTimeout("try { hs.expanders[" + this.key + "].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",
|
1819
|
+
hs.expandDuration);
|
1820
|
+
}
|
1821
|
+
},
|
1822
|
+
|
1823
|
+
getImageMapAreaCorrection : function(area) {
|
1824
|
+
var c = area.coords.split(',');
|
1825
|
+
for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]);
|
1826
|
+
|
1827
|
+
if (area.shape.toLowerCase() == 'circle') {
|
1828
|
+
this.x.tpos += c[0] - c[2];
|
1829
|
+
this.y.tpos += c[1] - c[2];
|
1830
|
+
this.x.t = this.y.t = 2 * c[2];
|
1831
|
+
} else {
|
1832
|
+
var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1];
|
1833
|
+
for (var i = 0; i < c.length; i++) {
|
1834
|
+
if (i % 2 == 0) {
|
1835
|
+
minX = Math.min(minX, c[i]);
|
1836
|
+
maxX = Math.max(maxX, c[i]);
|
1837
|
+
} else {
|
1838
|
+
minY = Math.min(minY, c[i]);
|
1839
|
+
maxY = Math.max(maxY, c[i]);
|
1840
|
+
}
|
1841
|
+
}
|
1842
|
+
this.x.tpos += minX;
|
1843
|
+
this.x.t = maxX - minX;
|
1844
|
+
this.y.tpos += minY;
|
1845
|
+
this.y.t = maxY - minY;
|
1846
|
+
}
|
1847
|
+
},
|
1848
|
+
justify : function (p, moveOnly) {
|
1849
|
+
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
|
1850
|
+
|
1851
|
+
if (tgt && tgt.match(/ /)) {
|
1852
|
+
tgtArr = tgt.split(' ');
|
1853
|
+
tgt = tgtArr[0];
|
1854
|
+
}
|
1855
|
+
if (tgt && hs.$(tgt)) {
|
1856
|
+
p.pos = hs.getPosition(hs.$(tgt))[dim];
|
1857
|
+
if (tgtArr && tgtArr[1] && tgtArr[1].match(/^[-]?[0-9]+px$/))
|
1858
|
+
p.pos += parseInt(tgtArr[1]);
|
1859
|
+
if (p.size < p.minSize) p.size = p.minSize;
|
1860
|
+
|
1861
|
+
} else if (p.justify == 'auto' || p.justify == 'center') {
|
1862
|
+
|
1863
|
+
var hasMovedMin = false;
|
1864
|
+
|
1865
|
+
var allowReduce = p.exp.allowSizeReduction;
|
1866
|
+
if (p.justify == 'center')
|
1867
|
+
p.pos = Math.round(p.scroll + (p.clientSize + p.marginMin - p.marginMax - p.get('wsize')) / 2);
|
1868
|
+
else
|
1869
|
+
p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
|
1870
|
+
if (p.pos < p.scroll + p.marginMin) {
|
1871
|
+
p.pos = p.scroll + p.marginMin;
|
1872
|
+
hasMovedMin = true;
|
1873
|
+
}
|
1874
|
+
if (!moveOnly && p.size < p.minSize) {
|
1875
|
+
p.size = p.minSize;
|
1876
|
+
allowReduce = false;
|
1877
|
+
}
|
1878
|
+
if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
|
1879
|
+
if (!moveOnly && hasMovedMin && allowReduce) {
|
1880
|
+
p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
|
1881
|
+
} else if (p.get('wsize') < p.get('fitsize')) {
|
1882
|
+
p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
|
1883
|
+
} else { // image larger than viewport
|
1884
|
+
p.pos = p.scroll + p.marginMin;
|
1885
|
+
if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
|
1886
|
+
}
|
1887
|
+
}
|
1888
|
+
|
1889
|
+
if (!moveOnly && p.size < p.minSize) {
|
1890
|
+
p.size = p.minSize;
|
1891
|
+
allowReduce = false;
|
1892
|
+
}
|
1893
|
+
|
1894
|
+
|
1895
|
+
} else if (p.justify == 'max') {
|
1896
|
+
p.pos = Math.floor(p.pos - p.size + p.t);
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
|
1900
|
+
if (p.pos < p.marginMin) {
|
1901
|
+
var tmpMin = p.pos;
|
1902
|
+
p.pos = p.marginMin;
|
1903
|
+
|
1904
|
+
if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);
|
1905
|
+
|
1906
|
+
}
|
1907
|
+
},
|
1908
|
+
|
1909
|
+
correctRatio : function(ratio) {
|
1910
|
+
var x = this.x,
|
1911
|
+
y = this.y,
|
1912
|
+
changed = false,
|
1913
|
+
xSize = Math.min(x.full, x.size),
|
1914
|
+
ySize = Math.min(y.full, y.size),
|
1915
|
+
useBox = (this.useBox || hs.padToMinWidth);
|
1916
|
+
|
1917
|
+
if (xSize / ySize > ratio) { // width greater
|
1918
|
+
xSize = ySize * ratio;
|
1919
|
+
if (xSize < x.minSize) { // below minWidth
|
1920
|
+
xSize = x.minSize;
|
1921
|
+
ySize = xSize / ratio;
|
1922
|
+
}
|
1923
|
+
changed = true;
|
1924
|
+
|
1925
|
+
} else if (xSize / ySize < ratio) { // height greater
|
1926
|
+
ySize = xSize / ratio;
|
1927
|
+
changed = true;
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
if (hs.padToMinWidth && x.full < x.minSize) {
|
1931
|
+
x.imgSize = x.full;
|
1932
|
+
y.size = y.imgSize = y.full;
|
1933
|
+
} else if (this.useBox) {
|
1934
|
+
x.imgSize = xSize;
|
1935
|
+
y.imgSize = ySize;
|
1936
|
+
} else {
|
1937
|
+
x.size = xSize;
|
1938
|
+
y.size = ySize;
|
1939
|
+
}
|
1940
|
+
changed = this.fitOverlayBox(this.useBox ? null : ratio, changed);
|
1941
|
+
if (useBox && y.size < y.imgSize) {
|
1942
|
+
y.imgSize = y.size;
|
1943
|
+
x.imgSize = y.size * ratio;
|
1944
|
+
}
|
1945
|
+
if (changed || useBox) {
|
1946
|
+
x.pos = x.tpos - x.cb + x.tb;
|
1947
|
+
x.minSize = x.size;
|
1948
|
+
this.justify(x, true);
|
1949
|
+
|
1950
|
+
y.pos = y.tpos - y.cb + y.tb;
|
1951
|
+
y.minSize = y.size;
|
1952
|
+
this.justify(y, true);
|
1953
|
+
if (this.overlayBox) this.sizeOverlayBox();
|
1954
|
+
}
|
1955
|
+
|
1956
|
+
|
1957
|
+
},
|
1958
|
+
fitOverlayBox : function(ratio, changed) {
|
1959
|
+
var x = this.x, y = this.y;
|
1960
|
+
if (this.overlayBox && (this.isImage || this.allowHeightReduction)) {
|
1961
|
+
while (y.size > this.minHeight && x.size > this.minWidth
|
1962
|
+
&& y.get('wsize') > y.get('fitsize')) {
|
1963
|
+
y.size -= 10;
|
1964
|
+
if (ratio) x.size = y.size * ratio;
|
1965
|
+
this.sizeOverlayBox(0, 1);
|
1966
|
+
changed = true;
|
1967
|
+
}
|
1968
|
+
}
|
1969
|
+
return changed;
|
1970
|
+
},
|
1971
|
+
|
1972
|
+
reflow : function () {
|
1973
|
+
if (this.scrollerDiv) {
|
1974
|
+
var h = /iframe/i.test(this.scrollerDiv.tagName) ? (this.getIframePageHeight() + 1) + 'px' : 'auto';
|
1975
|
+
if (this.body) this.body.style.height = h;
|
1976
|
+
this.scrollerDiv.style.height = h;
|
1977
|
+
this.y.setSize(this.innerContent.offsetHeight);
|
1978
|
+
}
|
1979
|
+
},
|
1980
|
+
|
1981
|
+
show : function () {
|
1982
|
+
var x = this.x, y = this.y;
|
1983
|
+
this.doShowHide('hidden');
|
1984
|
+
hs.fireEvent(this, 'onBeforeExpand');
|
1985
|
+
if (this.slideshow && this.slideshow.thumbstrip) this.slideshow.thumbstrip.selectThumb();
|
1986
|
+
|
1987
|
+
// Apply size change
|
1988
|
+
this.changeSize(
|
1989
|
+
1, {
|
1990
|
+
wrapper: {
|
1991
|
+
width : x.get('wsize'),
|
1992
|
+
height : y.get('wsize'),
|
1993
|
+
left: x.pos,
|
1994
|
+
top: y.pos
|
1995
|
+
},
|
1996
|
+
content: {
|
1997
|
+
left: x.p1 + x.get('imgPad'),
|
1998
|
+
top: y.p1 + y.get('imgPad'),
|
1999
|
+
width:x.imgSize || x.size,
|
2000
|
+
height:y.imgSize || y.size
|
2001
|
+
}
|
2002
|
+
},
|
2003
|
+
hs.expandDuration
|
2004
|
+
);
|
2005
|
+
},
|
2006
|
+
|
2007
|
+
changeSize : function(up, to, dur) {
|
2008
|
+
// transition
|
2009
|
+
var trans = this.transitions,
|
2010
|
+
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
|
2011
|
+
t = (trans[1] && other
|
2012
|
+
&& hs.getParam(other, 'transitions')[1] == trans[1]) ?
|
2013
|
+
trans[1] : trans[0];
|
2014
|
+
|
2015
|
+
if (this[t] && t != 'expand') {
|
2016
|
+
this[t](up, to);
|
2017
|
+
return;
|
2018
|
+
}
|
2019
|
+
|
2020
|
+
if (this.outline && !this.outlineWhileAnimating) {
|
2021
|
+
if (up) this.outline.setPosition();
|
2022
|
+
else this.outline.destroy(
|
2023
|
+
(this.isHtml && this.preserveContent));
|
2024
|
+
}
|
2025
|
+
|
2026
|
+
|
2027
|
+
if (!up) this.destroyOverlays();
|
2028
|
+
|
2029
|
+
var exp = this,
|
2030
|
+
x = exp.x,
|
2031
|
+
y = exp.y,
|
2032
|
+
easing = this.easing;
|
2033
|
+
if (!up) easing = this.easingClose || easing;
|
2034
|
+
var after = up ?
|
2035
|
+
function() {
|
2036
|
+
|
2037
|
+
if (exp.outline) exp.outline.table.style.visibility = "visible";
|
2038
|
+
setTimeout(function() {
|
2039
|
+
exp.afterExpand();
|
2040
|
+
}, 50);
|
2041
|
+
} :
|
2042
|
+
function() {
|
2043
|
+
exp.afterClose();
|
2044
|
+
};
|
2045
|
+
if (up) hs.setStyles(this.wrapper, {
|
2046
|
+
width: x.t + 'px',
|
2047
|
+
height: y.t + 'px'
|
2048
|
+
});
|
2049
|
+
if (up && this.isHtml) {
|
2050
|
+
hs.setStyles(this.wrapper, {
|
2051
|
+
left: (x.tpos - x.cb + x.tb) + 'px',
|
2052
|
+
top: (y.tpos - y.cb + y.tb) + 'px'
|
2053
|
+
});
|
2054
|
+
}
|
2055
|
+
if (this.fadeInOut) {
|
2056
|
+
hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
|
2057
|
+
hs.extend(to.wrapper, { opacity: up });
|
2058
|
+
}
|
2059
|
+
hs.animate(this.wrapper, to.wrapper, {
|
2060
|
+
duration: dur,
|
2061
|
+
easing: easing,
|
2062
|
+
step: function(val, args) {
|
2063
|
+
if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
|
2064
|
+
var fac = up ? args.pos : 1 - args.pos;
|
2065
|
+
var pos = {
|
2066
|
+
w: x.t + (x.get('wsize') - x.t) * fac,
|
2067
|
+
h: y.t + (y.get('wsize') - y.t) * fac,
|
2068
|
+
x: x.tpos + (x.pos - x.tpos) * fac,
|
2069
|
+
y: y.tpos + (y.pos - y.tpos) * fac
|
2070
|
+
};
|
2071
|
+
exp.outline.setPosition(pos, 0, 1);
|
2072
|
+
}
|
2073
|
+
if (exp.isHtml) {
|
2074
|
+
if (args.prop == 'left')
|
2075
|
+
exp.mediumContent.style.left = (x.pos - val) + 'px';
|
2076
|
+
if (args.prop == 'top')
|
2077
|
+
exp.mediumContent.style.top = (y.pos - val) + 'px';
|
2078
|
+
}
|
2079
|
+
}
|
2080
|
+
});
|
2081
|
+
hs.animate(this.content, to.content, dur, easing, after);
|
2082
|
+
if (up) {
|
2083
|
+
this.wrapper.style.visibility = 'visible';
|
2084
|
+
this.content.style.visibility = 'visible';
|
2085
|
+
if (this.isHtml) this.innerContent.style.visibility = 'visible';
|
2086
|
+
this.a.className += ' highslide-active-anchor';
|
2087
|
+
}
|
2088
|
+
},
|
2089
|
+
|
2090
|
+
|
2091
|
+
|
2092
|
+
fade : function(up, to) {
|
2093
|
+
this.outlineWhileAnimating = false;
|
2094
|
+
var exp = this, t = up ? hs.expandDuration : 0;
|
2095
|
+
|
2096
|
+
if (up) {
|
2097
|
+
hs.animate(this.wrapper, to.wrapper, 0);
|
2098
|
+
hs.setStyles(this.wrapper, { opacity: 0, visibility: 'visible' });
|
2099
|
+
hs.animate(this.content, to.content, 0);
|
2100
|
+
this.content.style.visibility = 'visible';
|
2101
|
+
|
2102
|
+
hs.animate(this.wrapper, { opacity: 1 }, t, null,
|
2103
|
+
function() {
|
2104
|
+
exp.afterExpand();
|
2105
|
+
});
|
2106
|
+
}
|
2107
|
+
|
2108
|
+
if (this.outline) {
|
2109
|
+
this.outline.table.style.zIndex = this.wrapper.style.zIndex;
|
2110
|
+
var dir = up || -1,
|
2111
|
+
offset = this.outline.offset,
|
2112
|
+
startOff = up ? 3 : offset,
|
2113
|
+
endOff = up ? offset : 3;
|
2114
|
+
for (var i = startOff; dir * i <= dir * endOff; i += dir,t += 25) {
|
2115
|
+
(function() {
|
2116
|
+
var o = up ? endOff - i : startOff - i;
|
2117
|
+
setTimeout(function() {
|
2118
|
+
exp.outline.setPosition(0, o, 1);
|
2119
|
+
}, t);
|
2120
|
+
})();
|
2121
|
+
}
|
2122
|
+
}
|
2123
|
+
|
2124
|
+
|
2125
|
+
if (up) {
|
2126
|
+
}//setTimeout(function() { exp.afterExpand(); }, t+50);
|
2127
|
+
else {
|
2128
|
+
setTimeout(function() {
|
2129
|
+
if (exp.outline) exp.outline.destroy(exp.preserveContent);
|
2130
|
+
|
2131
|
+
exp.destroyOverlays();
|
2132
|
+
|
2133
|
+
hs.animate(exp.wrapper, { opacity: 0 }, hs.restoreDuration, null, function() {
|
2134
|
+
exp.afterClose();
|
2135
|
+
});
|
2136
|
+
}, t);
|
2137
|
+
}
|
2138
|
+
},
|
2139
|
+
crossfade : function (up, to, from) {
|
2140
|
+
if (!up) return;
|
2141
|
+
var exp = this,
|
2142
|
+
last = this.last,
|
2143
|
+
x = this.x,
|
2144
|
+
y = this.y,
|
2145
|
+
lastX = last.x,
|
2146
|
+
lastY = last.y,
|
2147
|
+
wrapper = this.wrapper,
|
2148
|
+
content = this.content,
|
2149
|
+
overlayBox = this.overlayBox;
|
2150
|
+
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
|
2151
|
+
|
2152
|
+
hs.setStyles(content, {
|
2153
|
+
width: (x.imgSize || x.size) + 'px',
|
2154
|
+
height: (y.imgSize || y.size) + 'px'
|
2155
|
+
});
|
2156
|
+
if (overlayBox) overlayBox.style.overflow = 'visible';
|
2157
|
+
this.outline = last.outline;
|
2158
|
+
if (this.outline) this.outline.exp = exp;
|
2159
|
+
last.outline = null;
|
2160
|
+
var fadeBox = hs.createElement('div', {
|
2161
|
+
className: 'highslide-' + this.contentType
|
2162
|
+
}, {
|
2163
|
+
position: 'absolute',
|
2164
|
+
zIndex: 4,
|
2165
|
+
overflow: 'hidden',
|
2166
|
+
display: 'none'
|
2167
|
+
}
|
2168
|
+
);
|
2169
|
+
var names = { oldImg: last, newImg: this };
|
2170
|
+
for (var n in names) {
|
2171
|
+
this[n] = names[n].content.cloneNode(1);
|
2172
|
+
hs.setStyles(this[n], {
|
2173
|
+
position: 'absolute',
|
2174
|
+
border: 0,
|
2175
|
+
visibility: 'visible'
|
2176
|
+
});
|
2177
|
+
fadeBox.appendChild(this[n]);
|
2178
|
+
}
|
2179
|
+
wrapper.appendChild(fadeBox);
|
2180
|
+
if (this.isHtml) hs.setStyles(this.mediumContent, {
|
2181
|
+
left: 0,
|
2182
|
+
top: 0
|
2183
|
+
});
|
2184
|
+
if (overlayBox) {
|
2185
|
+
overlayBox.className = '';
|
2186
|
+
wrapper.appendChild(overlayBox);
|
2187
|
+
}
|
2188
|
+
fadeBox.style.display = '';
|
2189
|
+
last.content.style.display = 'none';
|
2190
|
+
|
2191
|
+
|
2192
|
+
if (hs.safari && hs.uaVersion < 525) {
|
2193
|
+
this.wrapper.style.visibility = 'visible';
|
2194
|
+
}
|
2195
|
+
hs.animate(wrapper, {
|
2196
|
+
width: x.size
|
2197
|
+
}, {
|
2198
|
+
duration: hs.transitionDuration,
|
2199
|
+
step: function(val, args) {
|
2200
|
+
var pos = args.pos,
|
2201
|
+
invPos = 1 - pos;
|
2202
|
+
var prop,
|
2203
|
+
size = {},
|
2204
|
+
props = ['pos', 'size', 'p1', 'p2'];
|
2205
|
+
for (var n in props) {
|
2206
|
+
prop = props[n];
|
2207
|
+
size['x' + prop] = Math.round(invPos * lastX[prop] + pos * x[prop]);
|
2208
|
+
size['y' + prop] = Math.round(invPos * lastY[prop] + pos * y[prop]);
|
2209
|
+
size.ximgSize = Math.round(
|
2210
|
+
invPos * (lastX.imgSize || lastX.size) + pos * (x.imgSize || x.size));
|
2211
|
+
size.ximgPad = Math.round(invPos * lastX.get('imgPad') + pos * x.get('imgPad'));
|
2212
|
+
size.yimgSize = Math.round(
|
2213
|
+
invPos * (lastY.imgSize || lastY.size) + pos * (y.imgSize || y.size));
|
2214
|
+
size.yimgPad = Math.round(invPos * lastY.get('imgPad') + pos * y.get('imgPad'));
|
2215
|
+
}
|
2216
|
+
if (exp.outline) exp.outline.setPosition({
|
2217
|
+
x: size.xpos,
|
2218
|
+
y: size.ypos,
|
2219
|
+
w: size.xsize + size.xp1 + size.xp2 + 2 * x.cb,
|
2220
|
+
h: size.ysize + size.yp1 + size.yp2 + 2 * y.cb
|
2221
|
+
});
|
2222
|
+
last.wrapper.style.clip = 'rect('
|
2223
|
+
+ (size.ypos - lastY.pos) + 'px, '
|
2224
|
+
+ (size.xsize + size.xp1 + size.xp2 + size.xpos + 2 * lastX.cb - lastX.pos) + 'px, '
|
2225
|
+
+ (size.ysize + size.yp1 + size.yp2 + size.ypos + 2 * lastY.cb - lastY.pos) + 'px, '
|
2226
|
+
+ (size.xpos - lastX.pos) + 'px)';
|
2227
|
+
|
2228
|
+
hs.setStyles(content, {
|
2229
|
+
top: (size.yp1 + y.get('imgPad')) + 'px',
|
2230
|
+
left: (size.xp1 + x.get('imgPad')) + 'px',
|
2231
|
+
marginTop: (y.pos - size.ypos) + 'px',
|
2232
|
+
marginLeft: (x.pos - size.xpos) + 'px'
|
2233
|
+
});
|
2234
|
+
hs.setStyles(wrapper, {
|
2235
|
+
top: size.ypos + 'px',
|
2236
|
+
left: size.xpos + 'px',
|
2237
|
+
width: (size.xp1 + size.xp2 + size.xsize + 2 * x.cb) + 'px',
|
2238
|
+
height: (size.yp1 + size.yp2 + size.ysize + 2 * y.cb) + 'px'
|
2239
|
+
});
|
2240
|
+
hs.setStyles(fadeBox, {
|
2241
|
+
width: (size.ximgSize || size.xsize) + 'px',
|
2242
|
+
height: (size.yimgSize || size.ysize) + 'px',
|
2243
|
+
left: (size.xp1 + size.ximgPad) + 'px',
|
2244
|
+
top: (size.yp1 + size.yimgPad) + 'px',
|
2245
|
+
visibility: 'visible'
|
2246
|
+
});
|
2247
|
+
|
2248
|
+
hs.setStyles(exp.oldImg, {
|
2249
|
+
top: (lastY.pos - size.ypos + lastY.p1 - size.yp1 + lastY.get('imgPad') - size.yimgPad) + 'px',
|
2250
|
+
left: (lastX.pos - size.xpos + lastX.p1 - size.xp1 + lastX.get('imgPad') - size.ximgPad) + 'px'
|
2251
|
+
});
|
2252
|
+
|
2253
|
+
hs.setStyles(exp.newImg, {
|
2254
|
+
opacity: pos,
|
2255
|
+
top: (y.pos - size.ypos + y.p1 - size.yp1 + y.get('imgPad') - size.yimgPad) + 'px',
|
2256
|
+
left: (x.pos - size.xpos + x.p1 - size.xp1 + x.get('imgPad') - size.ximgPad) + 'px'
|
2257
|
+
});
|
2258
|
+
if (overlayBox) hs.setStyles(overlayBox, {
|
2259
|
+
width: size.xsize + 'px',
|
2260
|
+
height: size.ysize + 'px',
|
2261
|
+
left: (size.xp1 + x.cb) + 'px',
|
2262
|
+
top: (size.yp1 + y.cb) + 'px'
|
2263
|
+
});
|
2264
|
+
},
|
2265
|
+
complete: function () {
|
2266
|
+
wrapper.style.visibility = content.style.visibility = 'visible';
|
2267
|
+
content.style.display = 'block';
|
2268
|
+
hs.discardElement(fadeBox);
|
2269
|
+
exp.afterExpand();
|
2270
|
+
last.afterClose();
|
2271
|
+
exp.last = null;
|
2272
|
+
}
|
2273
|
+
|
2274
|
+
});
|
2275
|
+
},
|
2276
|
+
reuseOverlay : function(o, el) {
|
2277
|
+
if (!this.last) return false;
|
2278
|
+
for (var i = 0; i < this.last.overlays.length; i++) {
|
2279
|
+
var oDiv = hs.$('hsId' + this.last.overlays[i]);
|
2280
|
+
if (oDiv && oDiv.hsId == o.hsId) {
|
2281
|
+
this.genOverlayBox();
|
2282
|
+
oDiv.reuse = this.key;
|
2283
|
+
hs.push(this.overlays, this.last.overlays[i]);
|
2284
|
+
return true;
|
2285
|
+
}
|
2286
|
+
}
|
2287
|
+
return false;
|
2288
|
+
},
|
2289
|
+
|
2290
|
+
|
2291
|
+
afterExpand : function() {
|
2292
|
+
this.isExpanded = true;
|
2293
|
+
this.focus();
|
2294
|
+
|
2295
|
+
if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent();
|
2296
|
+
if (this.iframe) {
|
2297
|
+
try {
|
2298
|
+
var exp = this,
|
2299
|
+
doc = this.iframe.contentDocument || this.iframe.contentWindow.document;
|
2300
|
+
hs.addEventListener(doc, 'mousedown', function () {
|
2301
|
+
if (hs.focusKey != exp.key) exp.focus();
|
2302
|
+
});
|
2303
|
+
} catch(e) {
|
2304
|
+
}
|
2305
|
+
if (hs.ie && typeof this.isClosing != 'boolean') // first open
|
2306
|
+
this.iframe.style.width = (this.objectWidth - 1) + 'px'; // hasLayout
|
2307
|
+
}
|
2308
|
+
if (this.dimmingOpacity) hs.dim(this);
|
2309
|
+
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
|
2310
|
+
this.prepareNextOutline();
|
2311
|
+
var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
|
2312
|
+
this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
|
2313
|
+
&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
|
2314
|
+
if (this.overlayBox) this.showOverlays();
|
2315
|
+
hs.fireEvent(this, 'onAfterExpand');
|
2316
|
+
|
2317
|
+
},
|
2318
|
+
|
2319
|
+
|
2320
|
+
prepareNextOutline : function() {
|
2321
|
+
var key = this.key;
|
2322
|
+
var outlineType = this.outlineType;
|
2323
|
+
new hs.Outline(outlineType,
|
2324
|
+
function () {
|
2325
|
+
try {
|
2326
|
+
hs.expanders[key].preloadNext();
|
2327
|
+
} catch (e) {
|
2328
|
+
}
|
2329
|
+
});
|
2330
|
+
},
|
2331
|
+
|
2332
|
+
|
2333
|
+
preloadNext : function() {
|
2334
|
+
var next = this.getAdjacentAnchor(1);
|
2335
|
+
if (next && next.onclick.toString().match(/hs\.expand/))
|
2336
|
+
var img = hs.createElement('img', { src: hs.getSrc(next) });
|
2337
|
+
},
|
2338
|
+
|
2339
|
+
|
2340
|
+
getAdjacentAnchor : function(op) {
|
2341
|
+
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
|
2342
|
+
if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
|
2343
|
+
if (op == 1) return as[0];
|
2344
|
+
else if (op == -1) return as[as.length - 1];
|
2345
|
+
}
|
2346
|
+
return (as && as[current + op]) || null;
|
2347
|
+
},
|
2348
|
+
|
2349
|
+
getAnchorIndex : function() {
|
2350
|
+
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
|
2351
|
+
if (arr) for (var i = 0; i < arr.length; i++) {
|
2352
|
+
if (arr[i] == this.a) return i;
|
2353
|
+
}
|
2354
|
+
return null;
|
2355
|
+
},
|
2356
|
+
|
2357
|
+
|
2358
|
+
getNumber : function() {
|
2359
|
+
if (this[this.numberPosition]) {
|
2360
|
+
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
|
2361
|
+
if (arr) {
|
2362
|
+
var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
|
2363
|
+
this[this.numberPosition].innerHTML =
|
2364
|
+
'<div class="highslide-number">' + s + '</div>' + this[this.numberPosition].innerHTML;
|
2365
|
+
}
|
2366
|
+
}
|
2367
|
+
},
|
2368
|
+
initSlideshow : function() {
|
2369
|
+
if (!this.last) {
|
2370
|
+
for (var i = 0; i < hs.slideshows.length; i++) {
|
2371
|
+
var ss = hs.slideshows[i], sg = ss.slideshowGroup;
|
2372
|
+
if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
|
2373
|
+
this.slideshow = new hs.Slideshow(this.key, ss);
|
2374
|
+
}
|
2375
|
+
} else {
|
2376
|
+
this.slideshow = this.last.slideshow;
|
2377
|
+
}
|
2378
|
+
var ss = this.slideshow;
|
2379
|
+
if (!ss) return;
|
2380
|
+
var key = ss.expKey = this.key;
|
2381
|
+
|
2382
|
+
ss.checkFirstAndLast();
|
2383
|
+
ss.disable('full-expand');
|
2384
|
+
if (ss.controls) {
|
2385
|
+
this.createOverlay(hs.extend(ss.overlayOptions || {}, {
|
2386
|
+
overlayId: ss.controls,
|
2387
|
+
hsId: 'controls',
|
2388
|
+
zIndex: 5
|
2389
|
+
}));
|
2390
|
+
}
|
2391
|
+
if (ss.thumbstrip) ss.thumbstrip.add(this);
|
2392
|
+
if (!this.last && this.autoplay) ss.play(true);
|
2393
|
+
if (ss.autoplay) {
|
2394
|
+
ss.autoplay = setTimeout(function() {
|
2395
|
+
hs.next(key);
|
2396
|
+
}, (ss.interval || 500));
|
2397
|
+
}
|
2398
|
+
},
|
2399
|
+
|
2400
|
+
cancelLoading : function() {
|
2401
|
+
hs.discardElement(this.wrapper);
|
2402
|
+
hs.expanders[this.key] = null;
|
2403
|
+
if (hs.upcoming == this.a) hs.upcoming = null;
|
2404
|
+
hs.undim(this.key);
|
2405
|
+
if (this.loading) hs.loading.style.left = '-9999px';
|
2406
|
+
hs.fireEvent(this, 'onHideLoading');
|
2407
|
+
},
|
2408
|
+
|
2409
|
+
writeCredits : function () {
|
2410
|
+
if (this.credits) return;
|
2411
|
+
this.credits = hs.createElement('a', {
|
2412
|
+
href: hs.creditsHref,
|
2413
|
+
target: hs.creditsTarget,
|
2414
|
+
className: 'highslide-credits',
|
2415
|
+
innerHTML: hs.lang.creditsText,
|
2416
|
+
title: hs.lang.creditsTitle
|
2417
|
+
});
|
2418
|
+
this.createOverlay({
|
2419
|
+
overlayId: this.credits,
|
2420
|
+
position: this.creditsPosition || 'top left',
|
2421
|
+
hsId: 'credits'
|
2422
|
+
});
|
2423
|
+
},
|
2424
|
+
|
2425
|
+
getInline : function(types, addOverlay) {
|
2426
|
+
for (var i = 0; i < types.length; i++) {
|
2427
|
+
var type = types[i], s = null;
|
2428
|
+
if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
|
2429
|
+
else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
|
2430
|
+
if (!this[type + 'Id'] && this.thumbsUserSetId)
|
2431
|
+
this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
|
2432
|
+
if (this[type + 'Id']) this[type] = hs.getNode(this[type + 'Id']);
|
2433
|
+
if (!this[type] && !this[type + 'Text'] && this[type + 'Eval']) try {
|
2434
|
+
s = eval(this[type + 'Eval']);
|
2435
|
+
} catch (e) {
|
2436
|
+
}
|
2437
|
+
if (!this[type] && this[type + 'Text']) {
|
2438
|
+
s = this[type + 'Text'];
|
2439
|
+
}
|
2440
|
+
if (!this[type] && !s) {
|
2441
|
+
this[type] = hs.getNode(this.a['_' + type + 'Id']);
|
2442
|
+
if (!this[type]) {
|
2443
|
+
var next = this.a.nextSibling;
|
2444
|
+
while (next && !hs.isHsAnchor(next)) {
|
2445
|
+
if ((new RegExp('highslide-' + type)).test(next.className || null)) {
|
2446
|
+
if (!next.id) this.a['_' + type + 'Id'] = next.id = 'hsId' + hs.idCounter++;
|
2447
|
+
this[type] = hs.getNode(next.id);
|
2448
|
+
break;
|
2449
|
+
}
|
2450
|
+
next = next.nextSibling;
|
2451
|
+
}
|
2452
|
+
}
|
2453
|
+
}
|
2454
|
+
if (!this[type] && !s && this.numberPosition == type) s = '\n';
|
2455
|
+
|
2456
|
+
if (!this[type] && s) this[type] = hs.createElement('div',
|
2457
|
+
{ className: 'highslide-' + type, innerHTML: s });
|
2458
|
+
|
2459
|
+
if (addOverlay && this[type]) {
|
2460
|
+
var o = { position: (type == 'heading') ? 'above' : 'below' };
|
2461
|
+
for (var x in this[type + 'Overlay']) o[x] = this[type + 'Overlay'][x];
|
2462
|
+
o.overlayId = this[type];
|
2463
|
+
this.createOverlay(o);
|
2464
|
+
}
|
2465
|
+
}
|
2466
|
+
},
|
2467
|
+
|
2468
|
+
|
2469
|
+
// on end move and resize
|
2470
|
+
doShowHide : function(visibility) {
|
2471
|
+
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
|
2472
|
+
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
|
2473
|
+
if (hs.geckoMac) this.showHideElements('*', visibility);
|
2474
|
+
},
|
2475
|
+
showHideElements : function (tagName, visibility) {
|
2476
|
+
var els = document.getElementsByTagName(tagName);
|
2477
|
+
var prop = tagName == '*' ? 'overflow' : 'visibility';
|
2478
|
+
for (var i = 0; i < els.length; i++) {
|
2479
|
+
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
|
2480
|
+
els[i], "").getPropertyValue('overflow') == 'auto'
|
2481
|
+
|| els[i].getAttribute('hidden-by') != null)) {
|
2482
|
+
var hiddenBy = els[i].getAttribute('hidden-by');
|
2483
|
+
if (visibility == 'visible' && hiddenBy) {
|
2484
|
+
hiddenBy = hiddenBy.replace('[' + this.key + ']', '');
|
2485
|
+
els[i].setAttribute('hidden-by', hiddenBy);
|
2486
|
+
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
|
2487
|
+
} else if (visibility == 'hidden') { // hide if behind
|
2488
|
+
var elPos = hs.getPosition(els[i]);
|
2489
|
+
elPos.w = els[i].offsetWidth;
|
2490
|
+
elPos.h = els[i].offsetHeight;
|
2491
|
+
if (!this.dimmingOpacity) { // hide all if dimming
|
2492
|
+
|
2493
|
+
var clearsX = (elPos.x + elPos.w < this.x.get('opos')
|
2494
|
+
|| elPos.x > this.x.get('opos') + this.x.get('osize'));
|
2495
|
+
var clearsY = (elPos.y + elPos.h < this.y.get('opos')
|
2496
|
+
|| elPos.y > this.y.get('opos') + this.y.get('osize'));
|
2497
|
+
}
|
2498
|
+
var wrapperKey = hs.getWrapperKey(els[i]);
|
2499
|
+
if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
|
2500
|
+
if (!hiddenBy) {
|
2501
|
+
els[i].setAttribute('hidden-by', '[' + this.key + ']');
|
2502
|
+
els[i].origProp = els[i].style[prop];
|
2503
|
+
els[i].style[prop] = 'hidden';
|
2504
|
+
|
2505
|
+
} else if (hiddenBy.indexOf('[' + this.key + ']') == -1) {
|
2506
|
+
els[i].setAttribute('hidden-by', hiddenBy + '[' + this.key + ']');
|
2507
|
+
}
|
2508
|
+
} else if ((hiddenBy == '[' + this.key + ']' || hs.focusKey == wrapperKey)
|
2509
|
+
&& wrapperKey != this.key) { // on move
|
2510
|
+
els[i].setAttribute('hidden-by', '');
|
2511
|
+
els[i].style[prop] = els[i].origProp || '';
|
2512
|
+
} else if (hiddenBy && hiddenBy.indexOf('[' + this.key + ']') > -1) {
|
2513
|
+
els[i].setAttribute('hidden-by', hiddenBy.replace('[' + this.key + ']', ''));
|
2514
|
+
}
|
2515
|
+
|
2516
|
+
}
|
2517
|
+
}
|
2518
|
+
}
|
2519
|
+
},
|
2520
|
+
|
2521
|
+
focus : function() {
|
2522
|
+
this.wrapper.style.zIndex = hs.zIndexCounter += 2;
|
2523
|
+
// blur others
|
2524
|
+
for (var i = 0; i < hs.expanders.length; i++) {
|
2525
|
+
if (hs.expanders[i] && i == hs.focusKey) {
|
2526
|
+
var blurExp = hs.expanders[i];
|
2527
|
+
blurExp.content.className += ' highslide-' + blurExp.contentType + '-blur';
|
2528
|
+
if (blurExp.isImage) {
|
2529
|
+
blurExp.content.style.cursor = hs.ieLt7 ? 'hand' : 'pointer';
|
2530
|
+
blurExp.content.title = hs.lang.focusTitle;
|
2531
|
+
}
|
2532
|
+
hs.fireEvent(blurExp, 'onBlur');
|
2533
|
+
}
|
2534
|
+
}
|
2535
|
+
|
2536
|
+
// focus this
|
2537
|
+
if (this.outline) this.outline.table.style.zIndex
|
2538
|
+
= this.wrapper.style.zIndex - 1;
|
2539
|
+
this.content.className = 'highslide-' + this.contentType;
|
2540
|
+
if (this.isImage) {
|
2541
|
+
this.content.title = hs.lang.restoreTitle;
|
2542
|
+
|
2543
|
+
if (hs.restoreCursor) {
|
2544
|
+
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url(' + hs.graphicsDir + hs.restoreCursor + '), pointer';
|
2545
|
+
if (hs.ieLt7 && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
|
2546
|
+
this.content.style.cursor = hs.styleRestoreCursor;
|
2547
|
+
}
|
2548
|
+
}
|
2549
|
+
hs.focusKey = this.key;
|
2550
|
+
hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
|
2551
|
+
hs.fireEvent(this, 'onFocus');
|
2552
|
+
},
|
2553
|
+
moveTo: function(x, y) {
|
2554
|
+
this.x.setPos(x);
|
2555
|
+
this.y.setPos(y);
|
2556
|
+
},
|
2557
|
+
resize : function (e) {
|
2558
|
+
var w, h, r = e.width / e.height;
|
2559
|
+
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
|
2560
|
+
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
|
2561
|
+
h = this.isHtml ? e.height + e.dY : w / r;
|
2562
|
+
if (h < Math.min(this.minHeight, this.y.full)) {
|
2563
|
+
h = Math.min(this.minHeight, this.y.full);
|
2564
|
+
if (this.isImage) w = h * r;
|
2565
|
+
}
|
2566
|
+
this.resizeTo(w, h);
|
2567
|
+
},
|
2568
|
+
resizeTo: function(w, h) {
|
2569
|
+
this.y.setSize(h);
|
2570
|
+
this.x.setSize(w);
|
2571
|
+
this.wrapper.style.height = this.y.get('wsize') + 'px';
|
2572
|
+
},
|
2573
|
+
|
2574
|
+
close : function() {
|
2575
|
+
if (this.isClosing || !this.isExpanded) return;
|
2576
|
+
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
|
2577
|
+
hs.getExpander(hs.upcoming).cancelLoading();
|
2578
|
+
hs.upcoming = null;
|
2579
|
+
}
|
2580
|
+
if (!hs.fireEvent(this, 'onBeforeClose')) return;
|
2581
|
+
this.isClosing = true;
|
2582
|
+
if (this.slideshow && !hs.upcoming) this.slideshow.pause();
|
2583
|
+
|
2584
|
+
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
|
2585
|
+
|
2586
|
+
try {
|
2587
|
+
if (this.isHtml) this.htmlPrepareClose();
|
2588
|
+
this.content.style.cursor = 'default';
|
2589
|
+
this.changeSize(
|
2590
|
+
0, {
|
2591
|
+
wrapper: {
|
2592
|
+
width : this.x.t,
|
2593
|
+
height : this.y.t,
|
2594
|
+
left: this.x.tpos - this.x.cb + this.x.tb,
|
2595
|
+
top: this.y.tpos - this.y.cb + this.y.tb
|
2596
|
+
},
|
2597
|
+
content: {
|
2598
|
+
left: 0,
|
2599
|
+
top: 0,
|
2600
|
+
width: this.x.t,
|
2601
|
+
height: this.y.t
|
2602
|
+
}
|
2603
|
+
}, hs.restoreDuration
|
2604
|
+
);
|
2605
|
+
} catch (e) {
|
2606
|
+
this.afterClose();
|
2607
|
+
}
|
2608
|
+
},
|
2609
|
+
|
2610
|
+
htmlPrepareClose : function() {
|
2611
|
+
if (hs.geckoMac) { // bad redraws
|
2612
|
+
if (!hs.mask) hs.mask = hs.createElement('div', null,
|
2613
|
+
{ position: 'absolute' }, hs.container);
|
2614
|
+
hs.setStyles(hs.mask, { width: this.x.size + 'px', height: this.y.size + 'px',
|
2615
|
+
left: this.x.pos + 'px', top: this.y.pos + 'px', display: 'block' });
|
2616
|
+
}
|
2617
|
+
if (this.objectType == 'swf') try {
|
2618
|
+
hs.$(this.body.id).StopPlay();
|
2619
|
+
} catch (e) {
|
2620
|
+
}
|
2621
|
+
|
2622
|
+
if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject();
|
2623
|
+
if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent)
|
2624
|
+
this.scrollerDiv.style.overflow = 'hidden';
|
2625
|
+
},
|
2626
|
+
|
2627
|
+
destroyObject : function () {
|
2628
|
+
if (hs.ie && this.iframe)
|
2629
|
+
try {
|
2630
|
+
this.iframe.contentWindow.document.body.innerHTML = '';
|
2631
|
+
} catch (e) {
|
2632
|
+
}
|
2633
|
+
if (this.objectType == 'swf') swfobject.removeSWF(this.body.id);
|
2634
|
+
this.body.innerHTML = '';
|
2635
|
+
},
|
2636
|
+
|
2637
|
+
sleep : function() {
|
2638
|
+
if (this.outline) this.outline.table.style.display = 'none';
|
2639
|
+
this.releaseMask = null;
|
2640
|
+
this.wrapper.style.display = 'none';
|
2641
|
+
this.isExpanded = false;
|
2642
|
+
hs.push(hs.sleeping, this);
|
2643
|
+
},
|
2644
|
+
|
2645
|
+
awake : function() {
|
2646
|
+
try {
|
2647
|
+
|
2648
|
+
hs.expanders[this.key] = this;
|
2649
|
+
|
2650
|
+
if (!hs.allowMultipleInstances && hs.focusKey != this.key) {
|
2651
|
+
try {
|
2652
|
+
hs.expanders[hs.focusKey].close();
|
2653
|
+
} catch (e) {
|
2654
|
+
}
|
2655
|
+
}
|
2656
|
+
|
2657
|
+
var z = hs.zIndexCounter++, stl = { display: '', zIndex: z };
|
2658
|
+
hs.setStyles(this.wrapper, stl);
|
2659
|
+
this.isClosing = false;
|
2660
|
+
|
2661
|
+
var o = this.outline || 0;
|
2662
|
+
if (o) {
|
2663
|
+
if (!this.outlineWhileAnimating) stl.visibility = 'hidden';
|
2664
|
+
hs.setStyles(o.table, stl);
|
2665
|
+
}
|
2666
|
+
if (this.slideshow) {
|
2667
|
+
this.initSlideshow();
|
2668
|
+
}
|
2669
|
+
|
2670
|
+
this.show();
|
2671
|
+
} catch (e) {
|
2672
|
+
}
|
2673
|
+
|
2674
|
+
|
2675
|
+
},
|
2676
|
+
|
2677
|
+
createOverlay : function (o) {
|
2678
|
+
var el = o.overlayId,
|
2679
|
+
relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
|
2680
|
+
if (typeof el == 'string') el = hs.getNode(el);
|
2681
|
+
if (o.html) el = hs.createElement('div', { innerHTML: o.html });
|
2682
|
+
if (!el || typeof el == 'string') return;
|
2683
|
+
if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return;
|
2684
|
+
el.style.display = 'block';
|
2685
|
+
o.hsId = o.hsId || o.overlayId;
|
2686
|
+
if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return;
|
2687
|
+
this.genOverlayBox();
|
2688
|
+
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
|
2689
|
+
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
|
2690
|
+
var overlay = hs.createElement(
|
2691
|
+
'div', {
|
2692
|
+
id: 'hsId' + hs.idCounter++,
|
2693
|
+
hsId: o.hsId
|
2694
|
+
}, {
|
2695
|
+
position: 'absolute',
|
2696
|
+
visibility: 'hidden',
|
2697
|
+
width: width,
|
2698
|
+
direction: hs.lang.cssDirection || '',
|
2699
|
+
opacity: 0
|
2700
|
+
},
|
2701
|
+
relToVP ? hs.viewport : this.overlayBox,
|
2702
|
+
true
|
2703
|
+
);
|
2704
|
+
if (relToVP) overlay.hsKey = this.key;
|
2705
|
+
|
2706
|
+
overlay.appendChild(el);
|
2707
|
+
hs.extend(overlay, {
|
2708
|
+
opacity: 1,
|
2709
|
+
offsetX: 0,
|
2710
|
+
offsetY: 0,
|
2711
|
+
dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
|
2712
|
+
});
|
2713
|
+
hs.extend(overlay, o);
|
2714
|
+
|
2715
|
+
|
2716
|
+
if (this.gotOverlays) {
|
2717
|
+
this.positionOverlay(overlay);
|
2718
|
+
if (!overlay.hideOnMouseOut || this.mouseIsOver)
|
2719
|
+
hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
|
2720
|
+
}
|
2721
|
+
hs.push(this.overlays, hs.idCounter - 1);
|
2722
|
+
},
|
2723
|
+
positionOverlay : function(overlay) {
|
2724
|
+
var p = overlay.position || 'middle center',
|
2725
|
+
relToVP = (overlay.relativeTo == 'viewport'),
|
2726
|
+
offX = overlay.offsetX,
|
2727
|
+
offY = overlay.offsetY;
|
2728
|
+
if (relToVP) {
|
2729
|
+
hs.viewport.style.display = 'block';
|
2730
|
+
overlay.hsKey = this.key;
|
2731
|
+
if (overlay.offsetWidth > overlay.parentNode.offsetWidth)
|
2732
|
+
overlay.style.width = '100%';
|
2733
|
+
} else
|
2734
|
+
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
|
2735
|
+
if (/left$/.test(p)) overlay.style.left = offX + 'px';
|
2736
|
+
|
2737
|
+
if (/center$/.test(p)) hs.setStyles(overlay, {
|
2738
|
+
left: '50%',
|
2739
|
+
marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) + 'px'
|
2740
|
+
});
|
2741
|
+
|
2742
|
+
if (/right$/.test(p)) overlay.style.right = - offX + 'px';
|
2743
|
+
|
2744
|
+
if (/^leftpanel$/.test(p)) {
|
2745
|
+
hs.setStyles(overlay, {
|
2746
|
+
right: '100%',
|
2747
|
+
marginRight: this.x.cb + 'px',
|
2748
|
+
top: - this.y.cb + 'px',
|
2749
|
+
bottom: - this.y.cb + 'px',
|
2750
|
+
overflow: 'auto'
|
2751
|
+
});
|
2752
|
+
this.x.p1 = overlay.offsetWidth;
|
2753
|
+
|
2754
|
+
} else if (/^rightpanel$/.test(p)) {
|
2755
|
+
hs.setStyles(overlay, {
|
2756
|
+
left: '100%',
|
2757
|
+
marginLeft: this.x.cb + 'px',
|
2758
|
+
top: - this.y.cb + 'px',
|
2759
|
+
bottom: - this.y.cb + 'px',
|
2760
|
+
overflow: 'auto'
|
2761
|
+
});
|
2762
|
+
this.x.p2 = overlay.offsetWidth;
|
2763
|
+
}
|
2764
|
+
var parOff = overlay.parentNode.offsetHeight;
|
2765
|
+
overlay.style.height = 'auto';
|
2766
|
+
if (relToVP && overlay.offsetHeight > parOff)
|
2767
|
+
overlay.style.height = hs.ieLt7 ? parOff + 'px' : '100%';
|
2768
|
+
|
2769
|
+
if (/^top/.test(p)) overlay.style.top = offY + 'px';
|
2770
|
+
if (/^middle/.test(p)) hs.setStyles(overlay, {
|
2771
|
+
top: '50%',
|
2772
|
+
marginTop: (offY - Math.round(overlay.offsetHeight / 2)) + 'px'
|
2773
|
+
});
|
2774
|
+
if (/^bottom/.test(p)) overlay.style.bottom = - offY + 'px';
|
2775
|
+
if (/^above$/.test(p)) {
|
2776
|
+
hs.setStyles(overlay, {
|
2777
|
+
left: (- this.x.p1 - this.x.cb) + 'px',
|
2778
|
+
right: (- this.x.p2 - this.x.cb) + 'px',
|
2779
|
+
bottom: '100%',
|
2780
|
+
marginBottom: this.y.cb + 'px',
|
2781
|
+
width: 'auto'
|
2782
|
+
});
|
2783
|
+
this.y.p1 = overlay.offsetHeight;
|
2784
|
+
|
2785
|
+
} else if (/^below$/.test(p)) {
|
2786
|
+
hs.setStyles(overlay, {
|
2787
|
+
position: 'relative',
|
2788
|
+
left: (- this.x.p1 - this.x.cb) + 'px',
|
2789
|
+
right: (- this.x.p2 - this.x.cb) + 'px',
|
2790
|
+
top: '100%',
|
2791
|
+
marginTop: this.y.cb + 'px',
|
2792
|
+
width: 'auto'
|
2793
|
+
});
|
2794
|
+
this.y.p2 = overlay.offsetHeight;
|
2795
|
+
overlay.style.position = 'absolute';
|
2796
|
+
}
|
2797
|
+
},
|
2798
|
+
|
2799
|
+
getOverlays : function() {
|
2800
|
+
this.getInline(['heading', 'caption'], true);
|
2801
|
+
this.getNumber();
|
2802
|
+
if (this.caption) hs.fireEvent(this, 'onAfterGetCaption');
|
2803
|
+
if (this.heading) hs.fireEvent(this, 'onAfterGetHeading');
|
2804
|
+
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
|
2805
|
+
if (hs.showCredits) this.writeCredits();
|
2806
|
+
for (var i = 0; i < hs.overlays.length; i++) {
|
2807
|
+
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
|
2808
|
+
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|
2809
|
+
|| (sg && sg === this.slideshowGroup)) {
|
2810
|
+
if (this.isImage || (this.isHtml && o.useOnHtml))
|
2811
|
+
this.createOverlay(o);
|
2812
|
+
}
|
2813
|
+
}
|
2814
|
+
var os = [];
|
2815
|
+
for (var i = 0; i < this.overlays.length; i++) {
|
2816
|
+
var o = hs.$('hsId' + this.overlays[i]);
|
2817
|
+
if (/panel$/.test(o.position)) this.positionOverlay(o);
|
2818
|
+
else hs.push(os, o);
|
2819
|
+
}
|
2820
|
+
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
|
2821
|
+
this.gotOverlays = true;
|
2822
|
+
},
|
2823
|
+
genOverlayBox : function() {
|
2824
|
+
if (!this.overlayBox) this.overlayBox = hs.createElement(
|
2825
|
+
'div', {
|
2826
|
+
className: this.wrapperClassName
|
2827
|
+
}, {
|
2828
|
+
position : 'absolute',
|
2829
|
+
width: (this.x.size || (this.useBox ? this.width : null)
|
2830
|
+
|| this.x.full) + 'px',
|
2831
|
+
height: (this.y.size || this.y.full) + 'px',
|
2832
|
+
visibility : 'hidden',
|
2833
|
+
overflow : 'hidden',
|
2834
|
+
zIndex : hs.ie ? 4 : 'auto'
|
2835
|
+
},
|
2836
|
+
hs.container,
|
2837
|
+
true
|
2838
|
+
);
|
2839
|
+
},
|
2840
|
+
sizeOverlayBox : function(doWrapper, doPanels) {
|
2841
|
+
var overlayBox = this.overlayBox,
|
2842
|
+
x = this.x,
|
2843
|
+
y = this.y;
|
2844
|
+
hs.setStyles(overlayBox, {
|
2845
|
+
width: x.size + 'px',
|
2846
|
+
height: y.size + 'px'
|
2847
|
+
});
|
2848
|
+
if (doWrapper || doPanels) {
|
2849
|
+
for (var i = 0; i < this.overlays.length; i++) {
|
2850
|
+
var o = hs.$('hsId' + this.overlays[i]);
|
2851
|
+
var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
|
2852
|
+
if (o && /^(above|below)$/.test(o.position)) {
|
2853
|
+
if (ie6) {
|
2854
|
+
o.style.width = (overlayBox.offsetWidth + 2 * x.cb
|
2855
|
+
+ x.p1 + x.p2) + 'px';
|
2856
|
+
}
|
2857
|
+
y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
|
2858
|
+
}
|
2859
|
+
if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
|
2860
|
+
o.style.height = (overlayBox.offsetHeight + 2 * y.cb) + 'px';
|
2861
|
+
}
|
2862
|
+
}
|
2863
|
+
}
|
2864
|
+
if (doWrapper) {
|
2865
|
+
hs.setStyles(this.content, {
|
2866
|
+
top: y.p1 + 'px'
|
2867
|
+
});
|
2868
|
+
hs.setStyles(overlayBox, {
|
2869
|
+
top: (y.p1 + y.cb) + 'px'
|
2870
|
+
});
|
2871
|
+
}
|
2872
|
+
},
|
2873
|
+
|
2874
|
+
showOverlays : function() {
|
2875
|
+
var b = this.overlayBox;
|
2876
|
+
b.className = '';
|
2877
|
+
hs.setStyles(b, {
|
2878
|
+
top: (this.y.p1 + this.y.cb) + 'px',
|
2879
|
+
left: (this.x.p1 + this.x.cb) + 'px',
|
2880
|
+
overflow : 'visible'
|
2881
|
+
});
|
2882
|
+
if (hs.safari) b.style.visibility = 'visible';
|
2883
|
+
this.wrapper.appendChild(b);
|
2884
|
+
for (var i = 0; i < this.overlays.length; i++) {
|
2885
|
+
var o = hs.$('hsId' + this.overlays[i]);
|
2886
|
+
o.style.zIndex = o.zIndex || 4;
|
2887
|
+
if (!o.hideOnMouseOut || this.mouseIsOver) {
|
2888
|
+
o.style.visibility = 'visible';
|
2889
|
+
hs.setStyles(o, { visibility: 'visible', display: '' });
|
2890
|
+
hs.animate(o, { opacity: o.opacity }, o.dur);
|
2891
|
+
}
|
2892
|
+
}
|
2893
|
+
},
|
2894
|
+
|
2895
|
+
destroyOverlays : function() {
|
2896
|
+
if (!this.overlays.length) return;
|
2897
|
+
if (this.slideshow) {
|
2898
|
+
var c = this.slideshow.controls;
|
2899
|
+
if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
|
2900
|
+
}
|
2901
|
+
for (var i = 0; i < this.overlays.length; i++) {
|
2902
|
+
var o = hs.$('hsId' + this.overlays[i]);
|
2903
|
+
if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o);
|
2904
|
+
}
|
2905
|
+
if (this.isHtml && this.preserveContent) {
|
2906
|
+
this.overlayBox.style.top = '-9999px';
|
2907
|
+
hs.container.appendChild(this.overlayBox);
|
2908
|
+
} else
|
2909
|
+
hs.discardElement(this.overlayBox);
|
2910
|
+
},
|
2911
|
+
|
2912
|
+
|
2913
|
+
|
2914
|
+
createFullExpand : function () {
|
2915
|
+
if (this.slideshow && this.slideshow.controls) {
|
2916
|
+
this.slideshow.enable('full-expand');
|
2917
|
+
return;
|
2918
|
+
}
|
2919
|
+
this.fullExpandLabel = hs.createElement(
|
2920
|
+
'a', {
|
2921
|
+
href: 'javascript:hs.expanders[' + this.key + '].doFullExpand();',
|
2922
|
+
title: hs.lang.fullExpandTitle,
|
2923
|
+
className: 'highslide-full-expand'
|
2924
|
+
}
|
2925
|
+
);
|
2926
|
+
if (!hs.fireEvent(this, 'onCreateFullExpand')) return;
|
2927
|
+
|
2928
|
+
this.createOverlay({
|
2929
|
+
overlayId: this.fullExpandLabel,
|
2930
|
+
position: hs.fullExpandPosition,
|
2931
|
+
hideOnMouseOut: true,
|
2932
|
+
opacity: hs.fullExpandOpacity
|
2933
|
+
});
|
2934
|
+
},
|
2935
|
+
|
2936
|
+
doFullExpand : function () {
|
2937
|
+
try {
|
2938
|
+
if (!hs.fireEvent(this, 'onDoFullExpand')) return;
|
2939
|
+
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
|
2940
|
+
|
2941
|
+
this.focus();
|
2942
|
+
var xSize = this.x.size;
|
2943
|
+
this.resizeTo(this.x.full, this.y.full);
|
2944
|
+
|
2945
|
+
var xpos = this.x.pos - (this.x.size - xSize) / 2;
|
2946
|
+
if (xpos < hs.marginLeft) xpos = hs.marginLeft;
|
2947
|
+
|
2948
|
+
this.moveTo(xpos, this.y.pos);
|
2949
|
+
this.doShowHide('hidden');
|
2950
|
+
|
2951
|
+
} catch (e) {
|
2952
|
+
this.error(e);
|
2953
|
+
}
|
2954
|
+
},
|
2955
|
+
|
2956
|
+
|
2957
|
+
afterClose : function () {
|
2958
|
+
this.a.className = this.a.className.replace('highslide-active-anchor', '');
|
2959
|
+
|
2960
|
+
this.doShowHide('visible');
|
2961
|
+
|
2962
|
+
if (this.isHtml && this.preserveContent
|
2963
|
+
&& this.transitions[1] != 'crossfade') {
|
2964
|
+
this.sleep();
|
2965
|
+
} else {
|
2966
|
+
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
|
2967
|
+
|
2968
|
+
hs.discardElement(this.wrapper);
|
2969
|
+
}
|
2970
|
+
if (hs.mask) hs.mask.style.display = 'none';
|
2971
|
+
this.destroyOverlays();
|
2972
|
+
if (!hs.viewport.childNodes.length) hs.viewport.style.display = 'none';
|
2973
|
+
|
2974
|
+
if (this.dimmingOpacity) hs.undim(this.key);
|
2975
|
+
hs.fireEvent(this, 'onAfterClose');
|
2976
|
+
hs.expanders[this.key] = null;
|
2977
|
+
hs.reOrder();
|
2978
|
+
}
|
2979
|
+
|
2980
|
+
};
|
2981
|
+
|
2982
|
+
|
2983
|
+
// hs.Ajax object prototype
|
2984
|
+
hs.Ajax = function (a, content, pre) {
|
2985
|
+
this.a = a;
|
2986
|
+
this.content = content;
|
2987
|
+
this.pre = pre;
|
2988
|
+
};
|
2989
|
+
|
2990
|
+
hs.Ajax.prototype = {
|
2991
|
+
run : function () {
|
2992
|
+
var xhr;
|
2993
|
+
if (!this.src) this.src = hs.getSrc(this.a);
|
2994
|
+
if (this.src.match('#')) {
|
2995
|
+
var arr = this.src.split('#');
|
2996
|
+
this.src = arr[0];
|
2997
|
+
this.id = arr[1];
|
2998
|
+
}
|
2999
|
+
if (hs.cachedGets[this.src]) {
|
3000
|
+
this.cachedGet = hs.cachedGets[this.src];
|
3001
|
+
if (this.id) this.getElementContent();
|
3002
|
+
else this.loadHTML();
|
3003
|
+
return;
|
3004
|
+
}
|
3005
|
+
try {
|
3006
|
+
xhr = new XMLHttpRequest();
|
3007
|
+
}
|
3008
|
+
catch (e) {
|
3009
|
+
try {
|
3010
|
+
xhr = new ActiveXObject("Msxml2.XMLHTTP");
|
3011
|
+
}
|
3012
|
+
catch (e) {
|
3013
|
+
try {
|
3014
|
+
xhr = new ActiveXObject("Microsoft.XMLHTTP");
|
3015
|
+
}
|
3016
|
+
catch (e) {
|
3017
|
+
this.onError();
|
3018
|
+
}
|
3019
|
+
}
|
3020
|
+
}
|
3021
|
+
var pThis = this;
|
3022
|
+
xhr.onreadystatechange = function() {
|
3023
|
+
if (pThis.xhr.readyState == 4) {
|
3024
|
+
if (pThis.id) pThis.getElementContent();
|
3025
|
+
else pThis.loadHTML();
|
3026
|
+
}
|
3027
|
+
};
|
3028
|
+
var src = this.src;
|
3029
|
+
this.xhr = xhr;
|
3030
|
+
if (hs.forceAjaxReload)
|
3031
|
+
src = src.replace(/$/, (/\?/.test(src) ? '&' : '?') + 'dummy=' + (new Date()).getTime());
|
3032
|
+
xhr.open('GET', src, true);
|
3033
|
+
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
3034
|
+
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
3035
|
+
xhr.send(null);
|
3036
|
+
},
|
3037
|
+
|
3038
|
+
getElementContent : function() {
|
3039
|
+
hs.init();
|
3040
|
+
var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null;
|
3041
|
+
|
3042
|
+
this.iframe = hs.createElement('iframe', attribs,
|
3043
|
+
{ position: 'absolute', top: '-9999px' }, hs.container);
|
3044
|
+
|
3045
|
+
this.loadHTML();
|
3046
|
+
},
|
3047
|
+
|
3048
|
+
loadHTML : function() {
|
3049
|
+
var s = this.cachedGet || this.xhr.responseText,
|
3050
|
+
regBody;
|
3051
|
+
if (this.pre) hs.cachedGets[this.src] = s;
|
3052
|
+
if (!hs.ie || hs.uaVersion >= 5.5) {
|
3053
|
+
s = s.replace(new RegExp('<link[^>]*>', 'gi'), '')
|
3054
|
+
.replace(new RegExp('<script[^>]*>.*?</script>', 'gi'), '');
|
3055
|
+
if (this.iframe) {
|
3056
|
+
var doc = this.iframe.contentDocument;
|
3057
|
+
if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document;
|
3058
|
+
if (!doc) { // Opera
|
3059
|
+
var pThis = this;
|
3060
|
+
setTimeout(function() {
|
3061
|
+
pThis.loadHTML();
|
3062
|
+
}, 25);
|
3063
|
+
return;
|
3064
|
+
}
|
3065
|
+
doc.open();
|
3066
|
+
doc.write(s);
|
3067
|
+
doc.close();
|
3068
|
+
try {
|
3069
|
+
s = doc.getElementById(this.id).innerHTML;
|
3070
|
+
} catch (e) {
|
3071
|
+
try {
|
3072
|
+
s = this.iframe.document.getElementById(this.id).innerHTML;
|
3073
|
+
} catch (e) {
|
3074
|
+
} // opera
|
3075
|
+
}
|
3076
|
+
hs.discardElement(this.iframe);
|
3077
|
+
} else {
|
3078
|
+
regBody = /(<body[^>]*>|<\/body>)/ig;
|
3079
|
+
if (regBody.test(s)) s = s.split(regBody)[hs.ieLt9 ? 1 : 2];
|
3080
|
+
|
3081
|
+
}
|
3082
|
+
}
|
3083
|
+
hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s;
|
3084
|
+
this.onLoad();
|
3085
|
+
for (var x in this) this[x] = null;
|
3086
|
+
}
|
3087
|
+
};
|
3088
|
+
|
3089
|
+
|
3090
|
+
hs.Slideshow = function (expKey, options) {
|
3091
|
+
if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
|
3092
|
+
this.expKey = expKey;
|
3093
|
+
for (var x in options) this[x] = options[x];
|
3094
|
+
if (this.useControls) this.getControls();
|
3095
|
+
if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this);
|
3096
|
+
};
|
3097
|
+
hs.Slideshow.prototype = {
|
3098
|
+
getControls: function() {
|
3099
|
+
this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) },
|
3100
|
+
null, hs.container);
|
3101
|
+
|
3102
|
+
var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close'];
|
3103
|
+
this.btn = {};
|
3104
|
+
var pThis = this;
|
3105
|
+
for (var i = 0; i < buttons.length; i++) {
|
3106
|
+
this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-' + buttons[i]);
|
3107
|
+
this.enable(buttons[i]);
|
3108
|
+
}
|
3109
|
+
this.btn.pause.style.display = 'none';
|
3110
|
+
//this.disable('full-expand');
|
3111
|
+
},
|
3112
|
+
checkFirstAndLast: function() {
|
3113
|
+
if (this.repeat || !this.controls) return;
|
3114
|
+
var exp = hs.expanders[this.expKey],
|
3115
|
+
cur = exp.getAnchorIndex(),
|
3116
|
+
re = /disabled$/;
|
3117
|
+
if (cur == 0)
|
3118
|
+
this.disable('previous');
|
3119
|
+
else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className))
|
3120
|
+
this.enable('previous');
|
3121
|
+
if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) {
|
3122
|
+
this.disable('next');
|
3123
|
+
this.disable('play');
|
3124
|
+
} else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) {
|
3125
|
+
this.enable('next');
|
3126
|
+
this.enable('play');
|
3127
|
+
}
|
3128
|
+
},
|
3129
|
+
enable: function(btn) {
|
3130
|
+
if (!this.btn) return;
|
3131
|
+
var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/;
|
3132
|
+
a.onclick = function() {
|
3133
|
+
sls[btn]();
|
3134
|
+
return false;
|
3135
|
+
};
|
3136
|
+
if (re.test(a.className)) a.className = a.className.replace(re, '');
|
3137
|
+
},
|
3138
|
+
disable: function(btn) {
|
3139
|
+
if (!this.btn) return;
|
3140
|
+
var a = this.btn[btn].getElementsByTagName('a')[0];
|
3141
|
+
a.onclick = function() {
|
3142
|
+
return false;
|
3143
|
+
};
|
3144
|
+
if (!/disabled$/.test(a.className)) a.className += ' disabled';
|
3145
|
+
},
|
3146
|
+
hitSpace: function() {
|
3147
|
+
if (this.autoplay) this.pause();
|
3148
|
+
else this.play();
|
3149
|
+
},
|
3150
|
+
play: function(wait) {
|
3151
|
+
if (this.btn) {
|
3152
|
+
this.btn.play.style.display = 'none';
|
3153
|
+
this.btn.pause.style.display = '';
|
3154
|
+
}
|
3155
|
+
|
3156
|
+
this.autoplay = true;
|
3157
|
+
if (!wait) hs.next(this.expKey);
|
3158
|
+
},
|
3159
|
+
pause: function() {
|
3160
|
+
if (this.btn) {
|
3161
|
+
this.btn.pause.style.display = 'none';
|
3162
|
+
this.btn.play.style.display = '';
|
3163
|
+
}
|
3164
|
+
|
3165
|
+
clearTimeout(this.autoplay);
|
3166
|
+
this.autoplay = null;
|
3167
|
+
},
|
3168
|
+
previous: function() {
|
3169
|
+
this.pause();
|
3170
|
+
hs.previous(this.btn.previous);
|
3171
|
+
},
|
3172
|
+
next: function() {
|
3173
|
+
this.pause();
|
3174
|
+
hs.next(this.btn.next);
|
3175
|
+
},
|
3176
|
+
move: function() {
|
3177
|
+
},
|
3178
|
+
'full-expand': function() {
|
3179
|
+
hs.getExpander().doFullExpand();
|
3180
|
+
},
|
3181
|
+
close: function() {
|
3182
|
+
hs.close(this.btn.close);
|
3183
|
+
}
|
3184
|
+
};
|
3185
|
+
hs.Thumbstrip = function(slideshow) {
|
3186
|
+
function add(exp) {
|
3187
|
+
hs.extend(options || {}, {
|
3188
|
+
overlayId: dom,
|
3189
|
+
hsId: 'thumbstrip',
|
3190
|
+
className: 'highslide-thumbstrip-' + mode + '-overlay ' + (options.className || '')
|
3191
|
+
});
|
3192
|
+
if (hs.ieLt7) options.fade = 0;
|
3193
|
+
exp.createOverlay(options);
|
3194
|
+
hs.setStyles(dom.parentNode, { overflow: 'hidden' });
|
3195
|
+
}
|
3196
|
+
|
3197
|
+
;
|
3198
|
+
|
3199
|
+
function scroll(delta) {
|
3200
|
+
selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7));
|
3201
|
+
}
|
3202
|
+
|
3203
|
+
;
|
3204
|
+
|
3205
|
+
function selectThumb(i, scrollBy) {
|
3206
|
+
if (i === undefined) for (var j = 0; j < group.length; j++) {
|
3207
|
+
if (group[j] == hs.expanders[slideshow.expKey].a) {
|
3208
|
+
i = j;
|
3209
|
+
break;
|
3210
|
+
}
|
3211
|
+
}
|
3212
|
+
if (i === undefined) return;
|
3213
|
+
var as = dom.getElementsByTagName('a'),
|
3214
|
+
active = as[i],
|
3215
|
+
cell = active.parentNode,
|
3216
|
+
left = isX ? 'Left' : 'Top',
|
3217
|
+
right = isX ? 'Right' : 'Bottom',
|
3218
|
+
width = isX ? 'Width' : 'Height',
|
3219
|
+
offsetLeft = 'offset' + left,
|
3220
|
+
offsetWidth = 'offset' + width,
|
3221
|
+
overlayWidth = div.parentNode.parentNode[offsetWidth],
|
3222
|
+
minTblPos = overlayWidth - table[offsetWidth],
|
3223
|
+
curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0,
|
3224
|
+
tblPos = curTblPos,
|
3225
|
+
mgnRight = 20;
|
3226
|
+
if (scrollBy !== undefined) {
|
3227
|
+
tblPos = curTblPos - scrollBy;
|
3228
|
+
|
3229
|
+
if (minTblPos > 0) minTblPos = 0;
|
3230
|
+
if (tblPos > 0) tblPos = 0;
|
3231
|
+
if (tblPos < minTblPos) tblPos = minTblPos;
|
3232
|
+
|
3233
|
+
|
3234
|
+
} else {
|
3235
|
+
for (var j = 0; j < as.length; j++) as[j].className = '';
|
3236
|
+
active.className = 'highslide-active-anchor';
|
3237
|
+
var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft],
|
3238
|
+
activeRight = cell[offsetLeft] + cell[offsetWidth] +
|
3239
|
+
(as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0);
|
3240
|
+
if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight;
|
3241
|
+
else if (activeLeft < -curTblPos) tblPos = -activeLeft;
|
3242
|
+
}
|
3243
|
+
var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos;
|
3244
|
+
hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad');
|
3245
|
+
hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad');
|
3246
|
+
scrollUp.style.display = tblPos < 0 ? 'block' : 'none';
|
3247
|
+
scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none';
|
3248
|
+
|
3249
|
+
}
|
3250
|
+
|
3251
|
+
;
|
3252
|
+
|
3253
|
+
|
3254
|
+
// initialize
|
3255
|
+
var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'],
|
3256
|
+
options = slideshow.thumbstrip,
|
3257
|
+
mode = options.mode || 'horizontal',
|
3258
|
+
floatMode = (mode == 'float'),
|
3259
|
+
tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'],
|
3260
|
+
isX = (mode == 'horizontal'),
|
3261
|
+
dom = hs.createElement('div', {
|
3262
|
+
className: 'highslide-thumbstrip highslide-thumbstrip-' + mode,
|
3263
|
+
innerHTML:
|
3264
|
+
'<div class="highslide-thumbstrip-inner">' +
|
3265
|
+
'<' + tree[0] + '><' + tree[1] + '></' + tree[1] + '></' + tree[0] + '></div>' +
|
3266
|
+
'<div class="highslide-scroll-up"><div></div></div>' +
|
3267
|
+
'<div class="highslide-scroll-down"><div></div></div>' +
|
3268
|
+
'<div class="highslide-marker"><div></div></div>'
|
3269
|
+
}, {
|
3270
|
+
display: 'none'
|
3271
|
+
}, hs.container),
|
3272
|
+
domCh = dom.childNodes,
|
3273
|
+
div = domCh[0],
|
3274
|
+
scrollUp = domCh[1],
|
3275
|
+
scrollDown = domCh[2],
|
3276
|
+
marker = domCh[3],
|
3277
|
+
table = div.firstChild,
|
3278
|
+
tbody = dom.getElementsByTagName(tree[1])[0],
|
3279
|
+
tr;
|
3280
|
+
for (var i = 0; i < group.length; i++) {
|
3281
|
+
if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody);
|
3282
|
+
(function() {
|
3283
|
+
var a = group[i],
|
3284
|
+
cell = hs.createElement(tree[3], null, null, tr),
|
3285
|
+
pI = i;
|
3286
|
+
hs.createElement('a', {
|
3287
|
+
href: a.href,
|
3288
|
+
onclick: function() {
|
3289
|
+
if (/highslide-active-anchor/.test(this.className)) return false;
|
3290
|
+
hs.getExpander(this).focus();
|
3291
|
+
return hs.transit(a);
|
3292
|
+
},
|
3293
|
+
innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML
|
3294
|
+
}, null, cell);
|
3295
|
+
})();
|
3296
|
+
}
|
3297
|
+
if (!floatMode) {
|
3298
|
+
scrollUp.onclick = function () {
|
3299
|
+
scroll(-1);
|
3300
|
+
};
|
3301
|
+
scrollDown.onclick = function() {
|
3302
|
+
scroll(1);
|
3303
|
+
};
|
3304
|
+
hs.addEventListener(tbody, document.onmousewheel !== undefined ?
|
3305
|
+
'mousewheel' : 'DOMMouseScroll', function(e) {
|
3306
|
+
var delta = 0;
|
3307
|
+
e = e || window.event;
|
3308
|
+
if (e.wheelDelta) {
|
3309
|
+
delta = e.wheelDelta / 120;
|
3310
|
+
if (hs.opera) delta = -delta;
|
3311
|
+
} else if (e.detail) {
|
3312
|
+
delta = -e.detail / 3;
|
3313
|
+
}
|
3314
|
+
if (delta) scroll(-delta * 0.2);
|
3315
|
+
if (e.preventDefault) e.preventDefault();
|
3316
|
+
e.returnValue = false;
|
3317
|
+
});
|
3318
|
+
}
|
3319
|
+
|
3320
|
+
return {
|
3321
|
+
add: add,
|
3322
|
+
selectThumb: selectThumb
|
3323
|
+
}
|
3324
|
+
};
|
3325
|
+
hs.langDefaults = hs.lang;
|
3326
|
+
// history
|
3327
|
+
var HsExpander = hs.Expander;
|
3328
|
+
if (hs.ie && window == window.top) {
|
3329
|
+
(function () {
|
3330
|
+
try {
|
3331
|
+
document.documentElement.doScroll('left');
|
3332
|
+
} catch (e) {
|
3333
|
+
setTimeout(arguments.callee, 50);
|
3334
|
+
return;
|
3335
|
+
}
|
3336
|
+
hs.ready();
|
3337
|
+
})();
|
3338
|
+
}
|
3339
|
+
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
|
3340
|
+
hs.addEventListener(window, 'load', hs.ready);
|
3341
|
+
|
3342
|
+
// set handlers
|
3343
|
+
hs.addEventListener(document, 'ready', function() {
|
3344
|
+
if (hs.expandCursor || hs.dimmingOpacity) {
|
3345
|
+
var style = hs.createElement('style', { type: 'text/css' }, null,
|
3346
|
+
document.getElementsByTagName('HEAD')[0]);
|
3347
|
+
|
3348
|
+
function addRule(sel, dec) {
|
3349
|
+
if (hs.ie && hs.uaVersion < 9) {
|
3350
|
+
var last = document.styleSheets[document.styleSheets.length - 1];
|
3351
|
+
if (typeof(last.addRule) == "object") last.addRule(sel, dec);
|
3352
|
+
} else {
|
3353
|
+
style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
|
3354
|
+
}
|
3355
|
+
}
|
3356
|
+
|
3357
|
+
function fix(prop) {
|
3358
|
+
return 'expression( ( ( ignoreMe = document.documentElement.' + prop +
|
3359
|
+
' ? document.documentElement.' + prop + ' : document.body.' + prop + ' ) ) + \'px\' );';
|
3360
|
+
}
|
3361
|
+
|
3362
|
+
if (hs.expandCursor) addRule('.highslide img',
|
3363
|
+
'cursor: url(' + hs.graphicsDir + hs.expandCursor + '), pointer !important;');
|
3364
|
+
addRule('.highslide-viewport-size',
|
3365
|
+
hs.ie && (hs.uaVersion < 7 || document.compatMode == 'BackCompat') ?
|
3366
|
+
'position: absolute; ' +
|
3367
|
+
'left:' + fix('scrollLeft') +
|
3368
|
+
'top:' + fix('scrollTop') +
|
3369
|
+
'width:' + fix('clientWidth') +
|
3370
|
+
'height:' + fix('clientHeight') :
|
3371
|
+
'position: fixed; width: 100%; height: 100%; left: 0; top: 0');
|
3372
|
+
}
|
3373
|
+
});
|
3374
|
+
hs.addEventListener(window, 'resize', function() {
|
3375
|
+
hs.getPageSize();
|
3376
|
+
if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) {
|
3377
|
+
var node = hs.viewport.childNodes[i],
|
3378
|
+
exp = hs.getExpander(node);
|
3379
|
+
exp.positionOverlay(node);
|
3380
|
+
if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb();
|
3381
|
+
}
|
3382
|
+
});
|
3383
|
+
hs.addEventListener(document, 'mousemove', function(e) {
|
3384
|
+
hs.mouse = { x: e.clientX, y: e.clientY };
|
3385
|
+
});
|
3386
|
+
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
|
3387
|
+
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
|
3388
|
+
hs.addEventListener(document, 'ready', hs.setClickEvents);
|
3389
|
+
hs.addEventListener(window, 'load', hs.preloadImages);
|
3390
|
+
hs.addEventListener(window, 'load', hs.preloadAjax);
|
3391
|
+
}
|