1 | {known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"} |
---|
2 | {known_script id="jquery.panorama" src=$ASP.Path|cat:"js/jquery.panorama.js"} |
---|
3 | {html_head} |
---|
4 | <link rel="stylesheet" type="text/css" href="{$ASP.Path}css/AS_Panorama.css"> |
---|
5 | <script type="text/javascript"> |
---|
6 | jQuery(document).ready(function(){ldelim} |
---|
7 | var w = $("#imageToolBar").width(); |
---|
8 | if (w === null) {ldelim} w = $("#theImage").width(); } |
---|
9 | if (w < {$ASP.min_viewport_width}) {ldelim} w = .75 * $("#theImage").width(); } |
---|
10 | var m = w; |
---|
11 | w = w * ( Math.min( Math.max({$ASP.viewport_width} / 100, .5) , 1 )); |
---|
12 | w = Math.round(Math.min( {$ASP.max_viewport_width} , Math.max( {$ASP.min_viewport_width}, w) )); |
---|
13 | var s = (100 - {$ASP.speed}) * 2000; |
---|
14 | var p = Math.round(Math.min(Math.max({$ASP.width} * ( {$ASP.start_position} / 100 ), 0), {$ASP.width})); |
---|
15 | if ({$ASP.width} > w) {ldelim} |
---|
16 | $("#theImage img").eq(0).removeAttr("style").attr({ldelim}width:{$ASP.width},height:{$ASP.height}}).addClass("simple_panorama"); |
---|
17 | var options = {ldelim} |
---|
18 | viewport_width: w, |
---|
19 | speed: s, |
---|
20 | direction: '{$ASP.direction}', |
---|
21 | control_display: '{$ASP.control_display}', |
---|
22 | start_position : p, |
---|
23 | auto_start : {$ASP.auto_start}, |
---|
24 | mode_360 : {$ASP.mode_360}, |
---|
25 | loop_180 : {$ASP.loop_180} |
---|
26 | }; |
---|
27 | $("#theImage img.simple_panorama").panorama(options); |
---|
28 | }; |
---|
29 | }); |
---|
30 | </script> |
---|
31 | {/html_head} |
---|
32 | <!-- Adapted simply by the "Panoramas" plugin (version {$ASP.Ver}): {$ASP.Dir}/template/AS_panorama_content.tpl --> |
---|
33 | <!-- for: {$ASP.image_name} ({$ASP.width}x{$ASP.height}) --> |
---|
34 | <div id="Panorama"> |
---|
35 | {$ASP.content} |
---|
36 | </div> |
---|