[10939] | 1 | {combine_css path="plugins/Panoramas/css/AS_Panorama.css"} |
---|
| 2 | |
---|
| 3 | {combine_script id="jquery.panorama" require="jquery" path="plugins/Panoramas/js/jquery.panorama.js"} |
---|
[19535] | 4 | {footer_script require="jquery.panorama" require='jquery.ui.draggable'} |
---|
[6527] | 5 | jQuery(document).ready(function(){ldelim} |
---|
| 6 | var w = $("#imageToolBar").width(); |
---|
| 7 | if (w === null) {ldelim} w = $("#theImage").width(); } |
---|
| 8 | if (w < {$ASP.min_viewport_width}) {ldelim} w = .75 * $("#theImage").width(); } |
---|
| 9 | var m = w; |
---|
| 10 | w = w * ( Math.min( Math.max({$ASP.viewport_width} / 100, .5) , 1 )); |
---|
| 11 | w = Math.round(Math.min( {$ASP.max_viewport_width} , Math.max( {$ASP.min_viewport_width}, w) )); |
---|
| 12 | var s = (100 - {$ASP.speed}) * 2000; |
---|
| 13 | var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width})); |
---|
[6533] | 14 | if ({$ASP.width} > w) {ldelim} |
---|
| 15 | $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama"); |
---|
| 16 | var options = {ldelim} |
---|
[19535] | 17 | viewport_width: w, |
---|
| 18 | speed: s, |
---|
| 19 | direction: '{$ASP.direction}', |
---|
| 20 | control_display: '{$ASP.control_display}', |
---|
| 21 | start_position : p, |
---|
| 22 | auto_start : {$ASP.auto_start}, |
---|
| 23 | mode_360 : {$ASP.mode_360}, |
---|
| 24 | loop_180 : {$ASP.loop_180}, |
---|
| 25 | img_name: '{$ASP.name}', |
---|
| 26 | cont_border: {$ASP.cont_border}, |
---|
| 27 | cont_border_color: '{$ASP.cont_border_color}', |
---|
| 28 | footer_display : '{$ASP.footer_display}', |
---|
| 29 | footer_color: '{$ASP.footer_color}', |
---|
| 30 | caption_color: '{$ASP.caption_color}', |
---|
| 31 | footer_control_color: '{$ASP.footer_control_color}' |
---|
[6533] | 32 | }; |
---|
| 33 | $("#theImage img.simple_panorama").panorama(options); |
---|
| 34 | }; |
---|
[6527] | 35 | }); |
---|
[10939] | 36 | {/footer_script} |
---|
| 37 | |
---|
[6533] | 38 | <!-- Adapted simply by the "Panoramas" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl --> |
---|
[6527] | 39 | <!-- for: {$ASP.image_name} ({$ASP.width}x{$ASP.height}) --> |
---|
| 40 | <div id="Panorama"> |
---|
| 41 | {$ASP.content} |
---|
[19535] | 42 | </div> |
---|
| 43 | <br /> |
---|