<?xml version="1.0" encoding="UTF-8"?>
<krpano version="1.19">

    
  <!-- Spot Style - WebLink -->
  <style name="IconWebLink"
         url="%FIRSTXML%/spots/hotspot_animated_user_defaultpoint0.png"
         visible="false"
         frame="0"
         lastframe="19"
         framewidth="64"
         frameheight="64"
         stopspotsequence="false"
         crop="0|0|64|64"
         alpha="0.8"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconWebLink"
         onover="onoverIconWebLink"
         onout="onoutIconWebLink"


         />

  <action name="onhoverIconWebLink">
    showtooltip('hotspot');
  </action>

  <action name="onoverIconWebLink">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation(forcehotspot);

  </action>

  <action name="onoutIconWebLink">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);
resumeautorotation(forcehotspot);

  </action>



  <!-- unsupported kind of display : PointMap -->


  
  <!-- Spot Style - Default Polygon Spot Style 1 -->
  <style name="PolygonDefaultPolygonSpotStyle1"
           visible="false"
           bordercolor="0xf8ff92"
           fillcolor="0xffffff"
           borderwidth="1"
           borderalpha.desktop="0.0"
           fillalpha.desktop="0.0"
           borderalpha.tablet.or.mobile="0.7000076295109483"
           fillalpha.tablet.or.mobile="0.40000000000000002"
           capture="false"
           onhover="onhoverPolygonDefaultPolygonSpotStyle1"
           onover="onoverPolygonDefaultPolygonSpotStyle1"
           onout="onoutPolygonDefaultPolygonSpotStyle1"
           />
  <action name="onhoverPolygonDefaultPolygonSpotStyle1">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygonDefaultPolygonSpotStyle1">
    set(borderwidth, 1);
    set(borderalpha, 0.7000076295109483);
    set(fillalpha, 0.40000000000000002);pauseautorotation(forcehotspot);

  </action>

  <action name="onoutPolygonDefaultPolygonSpotStyle1">

    set(borderwidth, 1);
    set(borderalpha, 0.0);
    set(fillalpha, 0.0);
    hideTooltip();resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - WebLink2 -->
  <style name="IconWebLink2"
         url="%FIRSTXML%/spots/hotspot_animated_user_defaultpoint1.png"
         visible="false"
         frame="0"
         lastframe="19"
         framewidth="64"
         frameheight="64"
         stopspotsequence="false"
         crop="0|0|64|64"
         alpha="0.8"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconWebLink2"
         onover="onoverIconWebLink2"
         onout="onoutIconWebLink2"


         />

  <action name="onhoverIconWebLink2">
    showtooltip('hotspot');
  </action>

  <action name="onoverIconWebLink2">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation(forcehotspot);

  </action>

  <action name="onoutIconWebLink2">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);
resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - Fotografia -->
  <style name="IconFotografia"
         url="%FIRSTXML%/spots/hotspot_image_sequence_user_defaultpoint2.png"
         visible="false"
         frame="0"
         lastframe="12"
         framewidth="85"
         frameheight="85"
         stopspotsequence="false"
         crop="0|0|85|85"
         alpha="0.8"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconFotografia"
         onover="onoverIconFotografia"
         onout="onoutIconFotografia"


         />

  <action name="onhoverIconFotografia">
    showtooltip('hotspot');
  </action>

  <action name="onoverIconFotografia">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation(forcehotspot);

  </action>

  <action name="onoutIconFotografia">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);
resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - Ir Panorama -->
  <style name="IconIrPanorama"
         url="%FIRSTXML%/spots/hotspot_image_user_defaultpoint3.png"
         visible="false"
         alpha="0.8"
         onhover="onhoverIconIrPanorama"
         onover="onoverIconIrPanorama"
         onout="onoutIconIrPanorama"

         height="90"
         width="90"
         />

  <action name="onhoverIconIrPanorama">
    showtooltip('hotspot');
  </action>

  <action name="onoverIconIrPanorama">
tween(scale, 1.2);
tween(alpha, 1);

  </action>

  <action name="onoutIconIrPanorama">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);

  </action>



    
  <!-- Spot Style - Website Informativo -->
  <style name="IconWebsiteInformativo"
         url="%FIRSTXML%/spots/hotspot_information_sequence_user_defaultpoint4.png"
         visible="false"
         frame="0"
         lastframe="19"
         framewidth="27"
         frameheight="54"
         stopspotsequence="false"
         crop="0|0|27|54"
         edge="bottom" ox="0" oy="0"
         alpha="0.8"
         onloaded="startspotanimation(0.1);showPermanentTooltip(touch);"
         onhover="onhoverIconWebsiteInformativo"
         onover="onoverIconWebsiteInformativo"
         onout="onoutIconWebsiteInformativo"

         height="40"
         width="20"
         />

  <action name="onhoverIconWebsiteInformativo">
    showtooltip('hotspot');
  </action>

  <action name="onoverIconWebsiteInformativo">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation(forcehotspot);

  </action>

  <action name="onoutIconWebsiteInformativo">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);
resumeautorotation(forcehotspot);

  </action>



    
  <!-- Spot Style - Slideshow -->
  <style name="IconSlideshow"
         url="%FIRSTXML%/spots/hotspot_image_sequence_user_defaultpoint5.png"
         visible="false"
         frame="0"
         lastframe="12"
         framewidth="85"
         frameheight="85"
         stopspotsequence="false"
         crop="0|0|85|85"
         alpha="0.8"
         onloaded="startspotanimation(0.1);"
         onhover="onhoverIconSlideshow"
         onover="onoverIconSlideshow"
         onout="onoutIconSlideshow"


         />

  <action name="onhoverIconSlideshow">
    showtooltip('hotspot');
  </action>

  <action name="onoverIconSlideshow">
tween(scale, 1.2);
tween(alpha, 1);
pauseautorotation(forcehotspot);

  </action>

  <action name="onoutIconSlideshow">
    hideTooltip();
    tween(scale, 1);
    tween(alpha, 0.8);
resumeautorotation(forcehotspot);

  </action>



<!-- ********** -->
<!-- Casa de Pedra -->
<!-- id : gallery -->
<!-- ********** -->

<ptplugin name="gallery" engine="kolorBox">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="margin_x" value="0" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="external_padding" value="15" type="int" />
		<option name="draggable_box" value="true" type="bool" />
		<option name="slideshow_autoplay" value="true" type="bool" />
		<option name="slideshow" value="5000" type="int" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_width" value="100" type="int" />
		<option name="container_width_unit" value="percent" type="string" />
		<option name="container_height" value="100" type="int" />
		<option name="container_height_unit" value="percent" type="string" />
		<option name="container_color" value="ffffff" type="string" />
		<option name="container_alpha" value="0.80000000000000004" type="float" />
		<option name="container_topleft_border_radius" value="15" type="int" />
		<option name="container_topright_border_radius" value="15" type="int" />
		<option name="container_bottomleft_border_radius" value="15" type="int" />
		<option name="container_bottomright_border_radius" value="15" type="int" />
		<option name="container_border_width" value="0" type="int" />
		<option name="container_border_color" value="ffffff" type="string" />
		<option name="container_border_alpha" value="1" type="float" />
		<option name="overlay_displayed" value="true" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="item_border_width" value="0" type="int" />
		<option name="item_border_color" value="ffffff" type="string" />
		<option name="item_border_alpha" value="1" type="float" />
		
		<option name="title_displayed" value="true" type="bool" />
		<option name="title_position" value="top" type="string" />
		<option name="title_font" value="Verdana" type="string" />
		<option name="title_size" value="14" type="int" />
		<option name="title_weight" value="bold" type="string" />
		<option name="title_style" value="normal" type="string" />
		<option name="title_decoration" value="none" type="string" />
		<option name="title_color" value="666666" type="string" />
		
		<option name="caption_displayed" value="true" type="bool" />
		<option name="caption_position" value="footer" type="string" />
		<option name="caption_font" value="Verdana" type="string" />
		<option name="caption_size" value="14" type="int" />
		<option name="caption_weight" value="normal" type="string" />
		<option name="caption_style" value="normal" type="string" />
		<option name="caption_decoration" value="none" type="string" />
		<option name="caption_color" value="666666" type="string" />
		<option name="caption_width" value="200" type="int" />
		<option name="caption_height" value="75" type="int" />
		<option name="caption_textalign" value="justify" type="string" />
		
		<option name="play_displayed" value="true" type="bool" />
		<option name="play_position" value="bottomleft" type="string" />
		<option name="play_text" value="galleryplay_text" type="string" />




		<option name="navigation_displayed" value="true" type="bool" />
		<option name="navigation_position" value="bottom" type="string" />
		<option name="counter_color" value="666666" type="string" />
		<option name="navprev_text" value="gallerynavprev_text" type="string" />
		<option name="navnext_text" value="gallerynavnext_text" type="string" />




		<option name="navigation_arrows" value="true" type="bool" />




		<option name="fullscreen_displayed" value="true" type="bool" />
		<option name="fullscreen_position" value="topleft" type="string" />
		<option name="fullscreen_text" value="galleryfullscreen_text" type="string" />




		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_text" value="galleryclose_text" type="string" />

		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback_gallery')" type="string" />
		<option name="zorder" value="1" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	<internaldata>
		<item name="item_1" title="gallerypicture_title0" caption="gallerypicture_caption0" value="macedodata/graphics/gallery/casapedra4.jpg"/>
		<item name="item_2" title="gallerypicture_title1" caption="gallerypicture_caption1" value="macedodata/graphics/gallery/casapedra3.jpg"/>
		<item name="item_3" title="gallerypicture_title2" caption="gallerypicture_caption2" value="macedodata/graphics/gallery/casapedra2.jpg"/>
		<item name="item_4" title="gallerypicture_title3" caption="gallerypicture_caption3" value="macedodata/graphics/gallery/casapedra1.jpg"/>
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady_gallery">
	set(ptplugin[gallery].jsready, true);
</action>

<action name="showGallery_gallery">
	ifnot(ptplugin[gallery].isOpen,
		if(ptplugin[gallery].doNotDeleteMe,
			set(ptplugin[gallery].currentCall, false);
		set(ptplugin[gallery].isOpen, true);
		set(ptplugin[gallery].doNotDeleteMe, false);
		set(gallery_boxurl, %1);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(gallery, openKolorBox, %1));
		,
			set(ptplugin[gallery].currentCall, true);
			set(ptplugin[gallery].doNotDeleteMe, true);
			events.dispatch(onremovedisplayedobject);
			delayedcall(0.3,showGallery_gallery(%1););
		);
	,
		if(%1 !== null AND %1 != gallery_boxurl,
			closeKolorBox_gallery();
			delayedcall(0.3,showGallery_gallery(%1););
		);
	);
</action>

<action name="toggleGallery_gallery">
	js(invokePluginFunction(gallery, toggleKolorBox, %1));
</action>


<action name="closeKolorBox_gallery">
	if(ptplugin[gallery].doNotDeleteMe,
		set(ptplugin[gallery].doNotDeleteMe, false);
	,
	js(invokePluginFunction(gallery, closeKolorBox));
	);
</action>

<action name="closeKolorBoxCallback_gallery">
	resumeautorotation(forceplugin);

	set(ptplugin[gallery].doNotDeleteMe, false);
	set(ptplugin[gallery].isOpen, false);
</action>

<action name="changeLanguage_gallery">
	if(ptplugin[gallery].jsready,
		js(invokePluginFunction(gallery, changeLanguage));
	,
		delayedcall(delay_gallery, 0.1, changeLanguage_gallery(););
	);
</action>

<events name="kolorBoxEvents_gallery" 
	keep="true"
	onremovepano="if(ptplugin[gallery].isOpen,closeKolorBox_gallery(););"
	onremovedisplayedobject="ifnot(ptplugin[gallery].currentCall,if(ptplugin[gallery].isOpen,closeKolorBox_gallery();););"
	changetourlanguage="changeLanguage_gallery();"
	/>

<!-- ********** -->
<!-- Classic Control Bar -->
<!-- id : controlBar_classic -->
<!-- ********** -->

  <krpano controlBar_classicbarbuilt="false" controlBar_classicbackgroundwidthwhenclosed="0" controlBar_classicbackgroundwidthwhenopened="0" controlBar_classicIsOpened="false" />
  <events name="controlBar_classicevents" 
    onxmlcomplete="controlBar_classicbuildMenuBar();" 


    keep="true" />



  <action name="controlBar_classicbuildMenuBar">
    ifnot (controlBar_classicbarbuilt, controlBar_classicbuildMenu(); set(controlBar_classicbarbuilt, true););
  </action>

  <action name="controlBar_classicbuildMenu">
    
    set(controlBar_classicbutton_pos, 20);

    set(layer[controlBar_classicbtn_hidecontrols].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_showcontrols].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);
    add(controlBar_classicbackgroundwidthwhenclosed, get(controlBar_classicbutton_pos), 20);



    if (device.desktop,
      set(layer[controlBar_classicbtn_display_help].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_close_help  ].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );

    if (device.fullscreensupport,
      set(layer[controlBar_classicbtn_openfs ].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_closefs].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );



    set(layer[controlBar_classicbtn_autorotate_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autorotate_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    set(layer[controlBar_classicbtn_autotour_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autotour_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    set(layer[controlBar_classicbtn_sound_on ].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_sound_off].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    if (device.desktop,
      set(layer[controlBar_classicbtn_ctrlmode_drag_to].x, get(controlBar_classicbutton_pos));
      set(layer[controlBar_classicbtn_ctrlmode_move_to].x, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );



    set(layer[controlBar_classicbtn_show_hotspots].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_hide_hotspots].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);


    if(plugin[gyroscope],
      set(controlBar_classicDisplayGyroscopeButton, false);
      if (device.tablet, set(controlBar_classicDisplayGyroscopeButton, true););
      if (device.mobile, set(controlBar_classicDisplayGyroscopeButton, true););
      if(controlBar_classicDisplayGyroscopeButton,
        set(layer[controlBar_classicbtn_gyroscope_on ].x, get(controlBar_classicbutton_pos));
        set(layer[controlBar_classicbtn_gyroscope_off].x, get(controlBar_classicbutton_pos));
        set(layer[controlBar_classicbtn_gyroscope_not].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
      );
    );


    set(layer[controlBar_classicbtn_home].x, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_home].x, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);

    if (device.desktop,
        set(layer[controlBar_classicbtn_right].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_left].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_down].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_up].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (device.desktop,
        set(layer[controlBar_classicbtn_out].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_in].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
    );
    if (scene.count GT 1,
        set(layer[controlBar_classicbtn_next_pano].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
        set(layer[controlBar_classicbtn_prev_pano].x, get(controlBar_classicbutton_pos));
        inc(controlBar_classicbutton_pos, 36);
      );



    inc(controlBar_classicbutton_pos, 20);

    set(controlBar_classicbackgroundwidthwhenopened, get(controlBar_classicbutton_pos));



    
    add(controlBar_classicVerifyVisibility, 20, 20);
    if(controlBar_classicbackgroundwidthwhenopened == controlBar_classicVerifyVisibility,
      set(controlBar_classicbackgroundwidthwhenopened, 0);


    );

	
	
  </action>

	<events name="controlBar_classicStartTourEvents" onTourStart="controlBar_classicCallOnStartTour();" keep="true" />

	<action name="controlBar_classicCallOnStartTour">
		
		set(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbutton_pos));
		set(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbutton_pos));
		showTourControls();

	</action>



  <style name="controlBar_classic_btn_style"
         keep="true"
         alpha="0.8"
         edge="right" align="right"
         width="36" height="36"
         zorder="4"
         onover="controlBar_classicctrlbaronoveraction();"
         onout="controlBar_classicctrlbaronoutaction();"
         onhover="showTooltip('plugin', controlBar_classicmenuTooltipStyle, bottom);"
         />
  <action name="controlBar_classicctrlbaronoveraction">
    tween(alpha,1,0.1,easeoutquad);
    tween(y,-2,0.1,easeoutquad);
  </action>  
  <action name="controlBar_classicctrlbaronoutaction">
    tween(alpha,0.8);
    tween(y,0,0.1,easeoutquad);
    hideTooltip();
  </action>

  <layer name="controlBar_classicmenu_controlbar_bg_img"
         keep="true"
         align="bottom"
         x="0" y="15"
         url="%FIRSTXML%/graphics/classiccontrolbar/footer.png"
         zorder="2"
         width="40"
         height="40"
         scale9grid="10|10|80|80"
         visible="false"
         />
  <layer name="controlBar_classicmenu_controlbar_bg"
         keep="true"
         align="bottom"
         x="0" y="15"
         type="container"
         zorder="3"
         width="40"
         height="40"
         visible="false"
         alpha="1.0"
         >

    <layer name="controlBar_classicbtn_hide_hotspots"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_show_hotspots.png"
            style="controlBar_classic_btn_style"
            onclick="hideHotspots();
"
            tooltip="controlBar_classichideSpotsTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_show_hotspots"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_show_hotspots.png"
            style="controlBar_classic_btn_style"
            onclick="showHotspots();
"
            tooltip="controlBar_classicshowSpotsTip"
            visible="false"
            />


    <layer name="controlBar_classicbtn_gyroscope_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope.png"
            style="controlBar_classic_btn_style"
            onclick="disableGyroscope();
"
            devices="html5"
            tooltip="controlBar_classicgyroOffTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_gyroscope_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope.png"
            style="controlBar_classic_btn_style"
            onclick="enableGyroscope();
"
            devices="html5"
            tooltip="controlBar_classicgyroOnTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_gyroscope_not"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_gyroscope_off.png"
            style="controlBar_classic_btn_style"
            enabled="true"
            capture="false"
            devices="html5"
            tooltip="controlBar_classicgyroNotTip"
            visible="false"
            />


    <layer name="controlBar_classicbtn_ctrlmode_move_to"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_to.png"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicctrlmodeMoveTip"
            onclick="setControlModeMoveTo();
"
            visible="false"
            devices="desktop"
            />
    <layer name="controlBar_classicbtn_ctrlmode_drag_to"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_drag_to.png"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicctrlmodeDragTip"
            onclick="setControlModeDragTo();
"
            visible="false"
            devices="desktop"
            />

    <layer name="controlBar_classicbtn_in"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_out"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomOutTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_home"
           url="%FIRSTXML%/graphics/classiccontrolbar/btn_home.png"
           onclick="controlBar_classicbtn_home_action();"
           style="controlBar_classic_btn_style"
           tooltip="controlBar_classichomeTip"
           visible="false"
           />
    <layer name="controlBar_classicbtn_left"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveLeftTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_right"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveRightTip"
            devices="desktop"
            visible="false"
            />

    <layer name="controlBar_classicbtn_up"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveUpTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_down"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicmoveDownTip"
            devices="desktop"
            visible="false"
            />


    <layer name="controlBar_classicbtn_sound_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_sound.png"
            onclick="playTourSounds();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicsoundsOnTip"
            />
    <layer name="controlBar_classicbtn_sound_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_sound.png"
            onclick="stopTourSounds();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicsoundsOffTip"
            />


    <layer name="controlBar_classicbtn_prev_pano"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicprevSceneTip"
            visible="false"
            />
    <layer name="controlBar_classicbtn_next_pano"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classicnextSceneTip"
            visible="false"
            />



    <layer name="controlBar_classicbtn_openfs"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_enter_fs.png"
            onclick="enterFullscreen();
"
            style="controlBar_classic_btn_style"
            devices="fullscreensupport"
            visible="false"
            tooltip="controlBar_classicopenFsTip"
            />
    <layer name="controlBar_classicbtn_closefs"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_close_fs.png"
            onclick="exitFullscreen();
"
            style="controlBar_classic_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="controlBar_classiccloseFsTip"
            />

    <layer name="controlBar_classicbtn_autorotate_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_autorotation.png"
            onclick="resumeautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOnTip"
            />
    <layer name="controlBar_classicbtn_autorotate_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_autorotation.png"
            onclick="pauseautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOffTip"
            />


    <layer name="controlBar_classicbtn_autotour_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_automatic_tour.png"
            onclick="startautotour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautotourOnTip"
            />
    <layer name="controlBar_classicbtn_autotour_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_automatic_tour.png"
            onclick="stopautotour();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautotourOffTip"
            />


    <layer name="controlBar_classicbtn_display_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="controlBar_classicdisplayHelp();"
            style="controlBar_classic_btn_style"
            devices="desktop"
            visible="false"
            tooltip="controlBar_classicdisplayHelpTip"
            />
    <layer name="controlBar_classicbtn_close_help"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_help.png"
            onclick="controlBar_classiccloseHelp();"
            style="controlBar_classic_btn_style"
            visible="false"
            devices="desktop"
            tooltip="controlBar_classichideHelpTip"
            />



    <layer name="controlBar_classicbtn_hidecontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_hide_controls.png"
            style="controlBar_classic_btn_style"
            onclick="hideTourControls();
"
            visible="false"
            tooltip="controlBar_classichideControlsTip"
            />
    <layer name="controlBar_classicbtn_showcontrols"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_show_controls.png"
            style="controlBar_classic_btn_style"
            onclick="showTourControls();
"
            tooltip="controlBar_classicdisplayControlsTip"
            visible="false"
            />
  </layer>



	<events name="controlBar_classicgyroscopeavailableevent"
		ongyroscopeavailable="controlBar_classicupdateGyroscopeButtonsAvailability();"
		ongyroscopeunavailable="controlBar_classicupdateGyroscopeButtonsAvailability();"
		ongyroscopeon="controlBar_classicenableGyroscopeButtons(true);"
		ongyroscopeoff="controlBar_classicenableGyroscopeButtons(false);"
		keep="true" devices="html5" />
	<krpano controlBar_classicmenugyroscopeavailable="false" controlBar_classicmenugyroscopeenabled="false" />
	<action name="controlBar_classicupdateGyroscopeButtonsAvailability">
		if (tour_gyroscopedevices,
			set(controlBar_classicmenugyroscopeavailable, true);
			controlBar_classicupdateGyroscopeButtons();
		,
			set(controlBar_classicmenugyroscopeavailable, false);
			controlBar_classicupdateGyroscopeButtons();
		);
	</action>
	<action name="controlBar_classicenableGyroscopeButtons">
		if (tour_gyroscopedevices,
			set(controlBar_classicmenugyroscopeenabled, %1);
			controlBar_classicupdateGyroscopeButtons();
		);
	</action>
	<action name="controlBar_classicHideGyroscopeButtons">
		set(layer[controlBar_classicbtn_gyroscope_off].visible, false);
		set(layer[controlBar_classicbtn_gyroscope_on].visible, false);
		if('%1' == 'true' AND plugin[gyroscope],
			set(layer[controlBar_classicbtn_gyroscope_not].visible, true);
		,
			set(layer[controlBar_classicbtn_gyroscope_not].visible, false);
		);
	</action>
	<action name="controlBar_classicShowGyroscopeButtons">
		if (controlBar_classicmenugyroscopeavailable,
			if (controlBar_classicmenugyroscopeenabled,
				set(layer[controlBar_classicbtn_gyroscope_off].visible, true);
				set(layer[controlBar_classicbtn_gyroscope_on].visible, false);
			,
				set(layer[controlBar_classicbtn_gyroscope_off].visible, false);
				set(layer[controlBar_classicbtn_gyroscope_on].visible, true);
			);
			set(layer[controlBar_classicbtn_gyroscope_not].visible, false);
		,
			controlBar_classicHideGyroscopeButtons(true);
		);
	</action>
	<action name="controlBar_classicupdateGyroscopeButtons">
	if (tour_gyroscopedevices,
		if (tour_displaycontrols,
			controlBar_classicShowGyroscopeButtons();
		,
			controlBar_classicHideGyroscopeButtons();
		);
	,
		if (tour_displaycontrols,
			controlBar_classicHideGyroscopeButtons(true);
		,
			controlBar_classicHideGyroscopeButtons();
		);
	);
	</action>


	<events name="controlBar_classiccontrolmodechangedevent" 
		oncontrolmodechanged="controlBar_classicupdateControlModeButtons();" 
		keep="true" />
	<action name="controlBar_classicHideControlModeButtons">
		set(layer[controlBar_classicbtn_ctrlmode_move_to].visible, false);
		set(layer[controlBar_classicbtn_ctrlmode_drag_to].visible, false);
	</action>
	<action name="controlBar_classicShowControlModeButtons">
		if (tour_controlmodemousetype == "moveto",
			set(layer[controlBar_classicbtn_ctrlmode_drag_to].visible, true);
			set(layer[controlBar_classicbtn_ctrlmode_move_to].visible, false);
		,
			set(layer[controlBar_classicbtn_ctrlmode_move_to].visible, true);
			set(layer[controlBar_classicbtn_ctrlmode_drag_to].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateControlModeButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			controlBar_classicShowControlModeButtons();
		,
			controlBar_classicHideControlModeButtons();
		);
	,
		controlBar_classicHideControlModeButtons();
	);
	</action>

  <events name="controlBar_classichideshowcontrolsevent" 
    hidetourcontrols="controlBar_classichideMenuControls();" 
    showtourcontrols="controlBar_classicshowMenuControls();" 
    keep="true" />

  <action name="controlBar_classichideMenuControls">
    set(controlBar_classicIsOpened, false);
    set(layer[controlBar_classicbtn_hidecontrols].visible, false);
    set(layer[controlBar_classicbtn_showcontrols].visible, true);
    controlBar_classicupdateFullscreenButtons();

    controlBar_classicupdateSoundButtons();

    if (scene.count GT 1,
    set(layer[controlBar_classicbtn_prev_pano].visible, false);
    set(layer[controlBar_classicbtn_next_pano].visible, false);
    );
    controlBar_classicupdateAutorotationButtons();

    controlBar_classicupdateAutotourButtons();

    set(layer[controlBar_classicbtn_up].visible  , false);
    set(layer[controlBar_classicbtn_down].visible, false);
    set(layer[controlBar_classicbtn_home].visible, false);
    set(layer[controlBar_classicbtn_right].visible, false);
    set(layer[controlBar_classicbtn_left].visible , false);
    set(layer[controlBar_classicbtn_in].visible , false);
    set(layer[controlBar_classicbtn_out].visible, false);


    controlBar_classicupdateControlModeButtons();
    controlBar_classicupdateHideShowHotspotsButtons();

    controlBar_classicupdateGyroscopeButtons();

    controlBar_classicupdateHelpButtons();


    if(controlBar_classicbackgroundwidthwhenclosed == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].width,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg].width,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
  </action>
  <action name="controlBar_classicshowMenuControls">
    set(controlBar_classicIsOpened, true);
    set(layer[controlBar_classicbtn_hidecontrols].visible, true);
    set(layer[controlBar_classicbtn_showcontrols].visible, false);
    if(controlBar_classicbackgroundwidthwhenopened == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
    controlBar_classicshowMenuButtons();


      tween(layer[controlBar_classicmenu_controlbar_bg_img].width, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
      tween(layer[controlBar_classicmenu_controlbar_bg].width, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);


  </action>
  <action name="controlBar_classicshowMenuButtons">
    if (device.desktop,
    set(layer[controlBar_classicbtn_up].visible  , true);
    set(layer[controlBar_classicbtn_down].visible, true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_right].visible, true);
    set(layer[controlBar_classicbtn_left].visible , true);
    );
    if (device.desktop,
    set(layer[controlBar_classicbtn_in].visible , true);
    set(layer[controlBar_classicbtn_out].visible, true);
    );
    set(layer[controlBar_classicbtn_home].visible, true);


    controlBar_classicupdateControlModeButtons();
    controlBar_classicupdateHideShowHotspotsButtons();

    controlBar_classicupdateGyroscopeButtons();

    controlBar_classicupdateHelpButtons();


    controlBar_classicupdateFullscreenButtons();

    controlBar_classicupdateSoundButtons();

    if (scene.count GT 1,
      set(layer[controlBar_classicbtn_prev_pano].visible, true);
      set(layer[controlBar_classicbtn_next_pano].visible, true);
    );
    controlBar_classicupdateAutorotationButtons();

    controlBar_classicupdateAutotourButtons();

  </action>

  <layer name="controlBar_classichelpScreen" align="center" keep="true" onclick="controlBar_classiccloseHelp();" url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_bg.png" visible="false" zorder="97" height="10%" width="prop" />

  <layer name="controlBar_classichelpScreenFg" align="center" keep="true" onclick="controlBar_classiccloseHelp();" displayed="false" 
         url="%FIRSTXML%/graphics/classiccontrolbar/help_screen_fg.png" 
         alpha="0.8" 
         height="50%" 
         width="prop" 
         zorder="98"
         visible="false" />
  <action name="controlBar_classicdisplayHelp">
    set(layer[controlBar_classichelpScreenFg].displayed,true);
    set(layer[controlBar_classichelpScreen].visible,true);
    tween(layer[controlBar_classichelpScreen].height, 50%, 1, easeOutQuad,
      set(layer[controlBar_classichelpScreenFg].visible,true);
    );
    controlBar_classicupdateHelpButtons();
  </action>
  <action name="controlBar_classiccloseHelp">
    set(layer[controlBar_classichelpScreenFg].displayed,false);
    set(layer[controlBar_classichelpScreenFg].visible,false);
    tween(layer[controlBar_classichelpScreen].height, 10%, 1, easeOutQuad,
      set(layer[controlBar_classichelpScreen].visible,false);
    );
    controlBar_classicupdateHelpButtons();
  </action>
	<action name="controlBar_classicHideHelpButtons">
		set(layer[controlBar_classicbtn_display_help].visible, false);
		set(layer[controlBar_classicbtn_close_help].visible, false);
	</action>
	<action name="controlBar_classicShowHelpButtons">
		if (layer[controlBar_classichelpScreenFg].displayed,
			set(layer[controlBar_classicbtn_close_help].visible, true);
			set(layer[controlBar_classicbtn_display_help].visible, false);
		,
			set(layer[controlBar_classicbtn_display_help].visible, true);
			set(layer[controlBar_classicbtn_close_help].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHelpButtons">
	if (device.desktop,
		if (tour_displaycontrols,
			controlBar_classicShowHelpButtons();
		,
			controlBar_classicHideHelpButtons();
		);
	,
		controlBar_classicHideHelpButtons();
	);
	</action>



	<events name="controlBar_classicmenufullscreenchangeevent"
		onenterfullscreen="controlBar_classicupdateFullscreenButtons();"
		onexitfullscreen="controlBar_classicupdateFullscreenButtons();"
		keep="true"/>
	<action name="controlBar_classicHideFullscreenButtons">
		set(layer[controlBar_classicbtn_openfs].visible , false);
		set(layer[controlBar_classicbtn_closefs].visible, false);
	</action>
	<action name="controlBar_classicShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[controlBar_classicbtn_openfs].visible , false);
				set(layer[controlBar_classicbtn_closefs].visible, true);
			,
				set(layer[controlBar_classicbtn_openfs].visible ,true);
				set(layer[controlBar_classicbtn_closefs].visible,false);
			);
		,
			controlBar_classicHideFullscreenButtons();
		);
	</action>
	<action name="controlBar_classicupdateFullscreenButtons">
		if (tour_displaycontrols,
			controlBar_classicShowFullscreenButtons();
		,
			controlBar_classicHideFullscreenButtons();
		);
	</action>

	<events name="controlBar_classicAutorotationEvents"
		onstartautorotation="controlBar_classicupdateAutorotationButtons();"
		onresumeautorotation="controlBar_classicupdateAutorotationButtons();"
		onstopautorotation="controlBar_classicupdateAutorotationButtons();"
		onpauseautorotation="controlBar_classicupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutorotationButtons">
		set(layer[controlBar_classicbtn_autorotate_off].visible, false);
		set(layer[controlBar_classicbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_classicbtn_autorotate_off].visible, false);
			set(layer[controlBar_classicbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autorotate_off].visible, true);
			set(layer[controlBar_classicbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutorotationButtons">
		if (tour_displaycontrols,
			controlBar_classicShowAutorotationButtons();
		,
			controlBar_classicHideAutorotationButtons();
		);
	</action>


	<events name="controlBar_classicAutotourEvents"
		onstartautotour="controlBar_classicupdateAutotourButtons();"
		onstopautotour="controlBar_classicupdateAutotourButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutotourButtons">
		set(layer[controlBar_classicbtn_autotour_off].visible, false);
		set(layer[controlBar_classicbtn_autotour_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutotourButtons">
		if (tour_autotourenabled == false,
			set(layer[controlBar_classicbtn_autotour_off].visible, false);
			set(layer[controlBar_classicbtn_autotour_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autotour_off].visible, true);
			set(layer[controlBar_classicbtn_autotour_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutotourButtons">
		if (tour_displaycontrols,
			controlBar_classicShowAutotourButtons();
		,
			controlBar_classicHideAutotourButtons();
		);
	</action>

	<events name="controlBar_classicplaystopsoundsevent" 
		playtoursoundsevent="controlBar_classicupdateSoundButtons();" 
		stoptoursoundsevent="controlBar_classicupdateSoundButtons();" 
		keep="true" />
	<action name="controlBar_classicHideSoundButtons">
		set(layer[controlBar_classicbtn_sound_off].visible, false);
		set(layer[controlBar_classicbtn_sound_on].visible , false);
	</action>
	<action name="controlBar_classicShowSoundButtons">
		if (tour_soundson == false,
			set(layer[controlBar_classicbtn_sound_off].visible, false);
			set(layer[controlBar_classicbtn_sound_on].visible , true);
		,
			set(layer[controlBar_classicbtn_sound_off].visible, true);
			set(layer[controlBar_classicbtn_sound_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateSoundButtons">
		if (tour_displaycontrols,
			controlBar_classicShowSoundButtons();
		,
			controlBar_classicHideSoundButtons();
		);
	</action>


	<events name="controlBar_classichotspotsdisplayevents"
		hotspots_visibility_changed="controlBar_classicupdateHideShowHotspotsButtons"
		keep="true"/>
	<action name="controlBar_classicHideHideShowHotspotsButtons">
		set(layer[controlBar_classicbtn_show_hotspots].visible, false);
		set(layer[controlBar_classicbtn_hide_hotspots].visible, false);
	</action>
	<action name="controlBar_classicShowHideShowHotspotsButtons">
		if (tour_displayspots,
			set(layer[controlBar_classicbtn_hide_hotspots].visible, true);
			set(layer[controlBar_classicbtn_show_hotspots].visible, false);
		,
			set(layer[controlBar_classicbtn_show_hotspots].visible, true);
			set(layer[controlBar_classicbtn_hide_hotspots].visible, false);
		);
	</action>
	<action name="controlBar_classicupdateHideShowHotspotsButtons">
		if (tour_displaycontrols,
			controlBar_classicShowHideShowHotspotsButtons();
		,
			controlBar_classicHideHideShowHotspotsButtons();
		);
	</action>

    <action name="controlBar_classicbtn_home_action">
      hideTooltip();lookto(get(panoview.h),get(panoview.v),get(panoview.fov),smooth(100,20,50));
      if(scene[get(xml.scene)].video,
        plugin[get(videointerface_video)].seek(0);
        ifnot(plugin[get(videointerface_video)].ispaused,
          plugin[get(videointerface_video)].play();
        );
      );
    </action>

<layer name="controlBar_classicmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	textshadow="1" textshadowrange="4.0" textshadowangle="45" textshadowcolor="0x000000" textshadowalpha="1"
	css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	padding="2"
	xoffset="0"
	yoffset="0"
	edge="bottom"
	/>



<!-- ********** -->
<!-- Loading Information -->
<!-- id : loaderinfo -->
<!-- ********** -->

  <events name="loaderinfoevent" onxmlcomplete="loaderinfoupdate();" keep="true"/>

  <action name="loaderinfoupdate">
    if(scene[get(xml.scene)].video,
      set(layer[loaderinfotextfield].visible, false);
    ,
      if (progress.progress == 1,
        delayedcall(0.5, set(layer[loaderinfotextfield].visible, false); );
      ,
        set(layer[loaderinfotextfield].visible, true);
      );
      mul(progresstext, get(progress.progress),100);
      roundval(progresstext);
      txtadd(progresstext, get(progresstext), %);
      set(layer[loaderinfotextfield].html, get(progresstext));
      ifnot(progress.progress GE 1, delayedcall(0.01, loaderinfoupdate() ));
    );
  </action>

  <layer name="loaderinfotextfield"
         keep="true"
         zorder="5"
         url="%FIRSTXML%/graphics/textfield.swf"
         align="center"
         x="0"
         y="0"
         borderwidth="0"
         background="false"
         autoheight="true"
         autowidth="auto"
         capture="false"
         handcursor="false"
         selectable="false"
         alpha="1"
         visible="true"
         css="
         text-align:center;
         color:#ffffff;
         font-family:Arial;
         font-weight:bold;
         font-size:16px;
         "
  />

<!-- ********** -->
<!-- Compass -->
<!-- id : compass -->
<!-- ********** -->

  <layer name="compassbackground"
         url="%FIRSTXML%/graphics/compass/compassbg7596e3.png"
         keep="true"
         handcursor="false"
         capture="false"
         align="topleft"
         x="0"
         y="0"
         zorder="6"
         visible="false"
         active="true"
         started="false"

         height="100"
         width="100"

         >




    <layer name="compasspointer"
           url="%FIRSTXML%/graphics/compass/compasspointerb13c2a.png"
           keep="true"
           align="center"
           handcursor="false"
           capture="false"
           zorder="1"
           height="100%"
           width="100%"
          />
  </layer>

  <events name="compassevts"
          keep="true"
          onnewpano="compassUpdateOrientation();"
          onviewchanged="compassUpdateOrientation();"
    onTourStart="set(layer[compassbackground].started, true);showcompass();"
          hidetourcontrols="hidecompass();"
          showtourcontrols="set(layer[compassbackground].started, true);showcompass();"
         />

  <action name="compassUpdateOrientation">
    if(scene[get(xml.scene)].planar,
      set(layer[compassbackground].active, false);
      hidecompass();
    ,

      set(layer[compassbackground].active, true);
      mod(compasshlookat, view.hlookat, 360);
      mul(compassheading, -1, get(scene[get(xml.scene)].heading));
      if (compassheading == null, set(compassheading, 0));
      sub(layer[compasspointer].rotate, compasshlookat, compassheading);

      showcompass();
    );
  </action>

 
  <action name="hidecompass">
    set(layer[compassbackground].visible, false);
  </action>
  <action name="showcompass">
    if(tour_displaycontrols,
    if(layer[compassbackground].active AND layer[compassbackground].started,set(layer[compassbackground].visible, true););
    ,hidecompass(););
  </action>

<!-- ********* -->
<!-- Gyroscope -->
<!-- ********* -->



<plugin name="gyroscope"
        url="%FIRSTXML%/graphics/gyro2.js"
        keep="true"
        devices="no-desktop.and.html5"

        onunavailable="checkGyroUnavailable();"
        sensor_mode="1"
        friction="auto"
        autocalibration="true"
        touch_mode="full"
        onavailable="delayedcall(1, checkGyroAvailability(););"
        enabled="false"
        activated="false"
        />

<events name="gyroscopeEvents" onnewpano="planarGyroscopeTest();" keep="true" />

<action name="planarGyroscopeTest">
  if(plugin[gyroscope],
          if(scene[get(xml.scene)].full360,
            set(sceneisfull360, false);
            sub(viewhfov, panoview.hmax, panoview.hmin);
            if (viewhfov == 360,
              sub(viewvfov, panoview.vmax, panoview.vmin);
              if (viewvfov == 180,
                set(sceneisfull360, true);
              );
            );
            if (sceneisfull360,
              set(plugin[gyroscope].camroll, true);
            ,
              set(plugin[gyroscope].camroll, false);
            );
          ,
            set(plugin[gyroscope].camroll, false);
          );
  );
</action>

<action name="changeGyroscopeState">
  if(plugin[gyroscope],
    if (plugin[gyroscope].isavailable,
        if(%1,
          set(plugin[gyroscope].activated,true);
        ,
          set(plugin[gyroscope].activated,false);
        );
        if (%1 != plugin[gyroscope].enabled,
          if(plugin[gyroscope].activated,
            switch(plugin[gyroscope].enabled);
          ,
            set(plugin[gyroscope].enabled, false);
          );
          if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
        );
    );
  );
</action>

<action name="checkGyroAvailability">
  if(plugin[gyroscope],
    if (plugin[gyroscope].isavailable,

      
      set(sceneisfull360, false);
      if (scene[get(xml.scene)].full360,
        sub(viewhfov, panoview.hmax, panoview.hmin);
        if (viewhfov == 360,
          sub(viewvfov, panoview.vmax, panoview.vmin);
          if (viewvfov == 180,
            set(sceneisfull360, true);
          );
        );
      );
      set(delaythegyrocheck, false);
      if (sceneisfull360 AND tour_firstlittleplanet, set(delaythegyrocheck, true));

      ifnot(delaythegyrocheck,
        
        switch(plugin[gyroscope].enabled);
        set(plugin[gyroscope].activated,true);
        
        set(tour_gyroscopedevices, true);
        events.dispatch(ongyroscopeavailable);
      ,
        delayedcall(1, checkGyroAvailability(););
      );
    ,
      set(tour_gyroscopedevices, false);
    );
    if (plugin[gyroscope].enabled, events.dispatch(ongyroscopeon);, events.dispatch(ongyroscopeoff););
  ,
    checkGyroUnavailable();
  );
</action>

<action name="checkGyroUnavailable">
  set(plugin[gyroscope].activated, false);
  set(plugin[gyroscope].enabled, false);
  set(tour_gyroscopedevices, false);
  events.dispatch(ongyroscopeunavailable);
</action>

<!-- ********** -->
<!-- PanotourMaps -->
<!-- id : panotourmaps -->
<!-- ********** -->

		<ptplugin name="panotourmaps" lat="41.5531654358" lng="-8.1355342865" zoom="11" maptypelayer="hybrid" position="left" size="20" resizable="true" multimap="false" openatstart="false" state="false" bgcolor="f2f2f2" zorder="8" centeronspots="true" engine="KolorMap">
	
		<radar visible="true" radius="8000" linktozoom="true" quality="8" linecolor="ffffff" lineopacity="1" linewidth="1" fillcolor="ffffff" fillopacity="0.30000762951094834" />
		
		<markers animation="" />
		
		
		<controls zoom="true" pan="true" scale="true" maptype="true" overview="false">
			<ui draggable="true" scrollable="true" dblclick="true" />
			<specific />
		</controls>
		
		<markerSelected name="" heading="" fov="" />
		
		
			<!-- PanotourMaps markers counter : 14 -->



				<marker name="spotmap559" 
					lat="41.4732246399" 
					lng="-6.86156320572" 
					heading="139.2000000000001" 
					draggable="false" 
					animated="true" 
					desc="spotmap559_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano188" 
					hasradar="true" 
					jsclick="spotmap559ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap560" 
					lat="41.4732208252" 
					lng="-6.86155986786" 
					heading="138.20000000000061" 
					draggable="false" 
					animated="true" 
					desc="spotmap560_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano203" 
					hasradar="true" 
					jsclick="spotmap560ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap561" 
					lat="41.654897222222" 
					lng="-6.9181444444444" 
					heading="69.599999999999568" 
					draggable="false" 
					animated="true" 
					desc="spotmap561_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano275" 
					hasradar="true" 
					jsclick="spotmap561ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap562" 
					lat="41.7113" 
					lng="-7.1097944444444" 
					heading="29.39999999999986" 
					draggable="false" 
					animated="true" 
					desc="spotmap562_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano223" 
					hasradar="true" 
					jsclick="spotmap562ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap563" 
					lat="41.552880555556" 
					lng="-6.9091666666667" 
					heading="39.199999999999591" 
					draggable="false" 
					animated="true" 
					desc="spotmap563_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano226" 
					hasradar="true" 
					jsclick="spotmap563ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap564" 
					lat="41.417905555556" 
					lng="-6.7627305555556" 
					heading="-55.799999999999223" 
					draggable="false" 
					animated="true" 
					desc="spotmap564_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano229" 
					hasradar="true" 
					jsclick="spotmap564ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap565" 
					lat="41.424769444444" 
					lng="-6.7627972222222" 
					heading="18.999999999999091" 
					draggable="false" 
					animated="true" 
					desc="spotmap565_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano232" 
					hasradar="true" 
					jsclick="spotmap565ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap566" 
					lat="41.4030036926" 
					lng="-7.03086805344" 
					heading="-174.20000000000061" 
					draggable="false" 
					animated="true" 
					desc="spotmap566_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano189" 
					hasradar="true" 
					jsclick="spotmap566ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap567" 
					lat="41.669613888889" 
					lng="-6.9949972222222" 
					heading="-169.4000000000018" 
					draggable="false" 
					animated="true" 
					desc="spotmap567_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano323" 
					hasradar="true" 
					jsclick="spotmap567ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap568" 
					lat="41.5531654358" 
					lng="-8.1355342865" 
					heading="-33.800000000000132" 
					draggable="false" 
					animated="true" 
					desc="spotmap568_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano21" 
					hasradar="true" 
					jsclick="spotmap568ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap569" 
					lat="41.5531654358" 
					lng="-8.1355342865" 
					heading="0" 
					draggable="false" 
					animated="true" 
					desc="spotmap569_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano153" 
					hasradar="true" 
					jsclick="spotmap569ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap570" 
					lat="41.526552777778" 
					lng="-8.0900833333333" 
					heading="-173.00000000000099" 
					draggable="false" 
					animated="true" 
					desc="spotmap570_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano435" 
					hasradar="true" 
					jsclick="spotmap570ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap571" 
					lat="41.551024" 
					lng="-8.11791" 
					heading="67.199999999999932" 
					draggable="false" 
					animated="true" 
					desc="spotmap571_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano438" 
					hasradar="true" 
					jsclick="spotmap571ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>



				<marker name="spotmap572" 
					lat="41.487741" 
					lng="-8.067778" 
					heading="0.99999999999994316" 
					draggable="false" 
					animated="true" 
					desc="spotmap572_tooltip" 
					desctype="info" 
					onhover="true" 
					isscene="true" 
					scene="pano440" 
					hasradar="true" 
					jsclick="spotmap572ActionSpotMap">
					<markericon url="spots/hotspot_image_user_defaultmap0.png" iconwidth="30" iconheight="30" shadow="false" iconanchor="center" />
				</marker>
		


		
	</ptplugin>
	
	<action name="kolorMapJsReady_panotourmaps">
		set(ptplugin[panotourmaps].jsready, true);
	</action>
	
	
	
		<!-- PanotourMaps markers counter : 14 -->
				<action name="spotmap559ActionSpotMap">
          mainloadscene(pano188);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap560ActionSpotMap">
          mainloadscene(pano203);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap561ActionSpotMap">
          mainloadscene(pano275);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap562ActionSpotMap">
          mainloadscene(pano223);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap563ActionSpotMap">
          mainloadscene(pano226);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap564ActionSpotMap">
          mainloadscene(pano229);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap565ActionSpotMap">
          mainloadscene(pano232);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap566ActionSpotMap">
          mainloadscene(pano189);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap567ActionSpotMap">
          mainloadscene(pano323);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap568ActionSpotMap">
          mainloadscene(pano21);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap569ActionSpotMap">
          mainloadscene(pano153);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap570ActionSpotMap">
          mainloadscene(pano435);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap571ActionSpotMap">
          mainloadscene(pano438);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
				<action name="spotmap572ActionSpotMap">
          mainloadscene(pano440);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));

</action>
	


	
	
	
	<!-- Begin PanotourMaps events and actions -->
	<events name="panotourmapsEvents" 
	onxmlcomplete="ifnot(panotourmapsMapLoaded,set(tour_displaymap,false););" 
	onnewpano="panotourmapsActivateDefaultMarker();" 
	onviewchanged="panotourmapsOnviewchange()" 
	onhidetourmap="panotourmapsClosetourmap();" 
	onshowtourmap="if(tour_displaymap,panotourmapsOpentourmap(););" 
	hidetourcontrols="panotourmapsClosetourmap();" 
	showtourcontrols="if(tour_displaymap,panotourmapsOpentourmap(););" 
	onenterfullscreen="panotourmapsUpdateMaxMapSize();" 
	onexitfullscreen="panotourmapsUpdateMaxMapSize();" 
	keep="true" />
	
	
	<krpano panotourmapsMarkerDefaultSet="false" />
	<krpano panotourmapsMapLoaded="false" />
	
	
	<action name="panotourmapsUpdateMaxMapSize">
		js(invokePluginFunction(panotourmaps, updateResizableMapMaxSize));
	</action>
	
	<action name="kolorMapJsReadyLoop_panotourmaps">
		if(ptplugin[panotourmaps].jsready,
			stopdelayedcall(jsReadyLoopId_panotourmaps);
			if(%1 == "close",
				panotourmapsClosetourmap();
			,
				panotourmapsOpentourmap();
			);
		,
			delayedcall(jsReadyLoopId_panotourmaps, 0.2, kolorMapJsReadyLoop_panotourmaps(%1));
		);
	</action>
	
	<action name="panotourmapsClosetourmap">
		if(ptplugin[panotourmaps].jsready,
			set(ptplugin[panotourmaps].state, false);
			js(invokePluginFunction(panotourmaps, openCloseMap, close));
		,
			kolorMapJsReadyLoop_panotourmaps(close);
		);
	</action>
	
	
	<action name="panotourmapsOpentourmap">
		if(ptplugin[panotourmaps].jsready,
			set(ptplugin[panotourmaps].state, true);
			js(invokePluginFunction(panotourmaps, openCloseMap, open));
		,
			kolorMapJsReadyLoop_panotourmaps(open);
		);
	</action>
	
	
	<action name="panotourmapsChangescene">
		mainloadscene(%1);if(xml.scene != %1,panotourmapsGoMarker(%2););
	</action>
	
	<action name="panotourmapsOnviewchange">
		if ( panotourmapsMapLoaded == true,
			ifnot(ptplugin[panotourmaps].markerSelected.name == "",
				js(invokePluginFunction(panotourmaps, changeDirection, get(view.hlookat), get(view.hfov)));
			);
		);
	</action>
	
	<action name="panotourmapsGoMarker">
		if ( panotourmapsMapLoaded == true,
			
			set(ptplugin[panotourmaps].markerSelected.name, %1);
			set(ptplugin[panotourmaps].markerSelected.heading, get(view.hlookat));
			set(ptplugin[panotourmaps].markerSelected.fov, get(view.hfov));
			js(invokePluginFunction(panotourmaps, changeCurrentMarker, %1, get(view.hlookat), get(view.hfov), get(ptplugin[panotourmaps].centeronspots)));
			
			if( panotourmapsMarkerDefaultSet == false,
				js(setMapDefaultMarker(panotourmaps, %1, get(view.hlookat), get(view.hfov)));
				set(panotourmapsMarkerDefaultSet,true);
			);
		);
	</action>
	
	<action name="panotourmapsUnselectMarker">
		set(ptplugin[panotourmaps].markerSelected.name, "");
		js(invokePluginFunction(panotourmaps, unselectCurrentMarker));
		
		js(setMapDefaultMarker(panotourmaps, null, null, null));
	</action>

	<action name="panotourmapsActivateDefaultMarker">
		set(panotourmapsMapLoaded, true);
		
		set(panotourmapsMapSpotFound, false);
		for(set(defaultmarkerinc,0), defaultmarkerinc LT ptplugin[panotourmaps].marker.count , inc(defaultmarkerinc),
                        if(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].isscene == true,
				if(panotourmapsMapSpotFound == false,
					if(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].scene == xml.scene,
						ifnot(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].name == ptplugin[panotourmaps].markerSelected.name,
							panotourmapsGoMarker(get(ptplugin[panotourmaps].marker[get(defaultmarkerinc)].name));
						);
						set(panotourmapsMapSpotFound, true);
					);
				);
			);
		);
		
		if(panotourmapsMapSpotFound == false,
			panotourmapsUnselectMarker();
		);
	</action>



<!-- ********** -->
<!-- Radar -->
<!-- id : radar -->
<!-- ********** -->

  <layer name="radar" keep="true"
         url="%FIRSTXML%/graphics/radar.js"
         align="bottomright"
         x="50" y="50"
         heading="0.0"
         headingoffset="0.0"
         fillcolor="0xffffff"
         fillalpha="0.50000762951094835"
         width="100"
         height="100"
         zorder="9"
         visible="false"
         active="true"
         started="false"
         />

  <events name="radarevents"
    onnewpano="radarOnNewPano" 
    onTourStart="set(layer[radar].started, true);showradar();"
    hidetourcontrols="hideradar();"
    showtourcontrols="set(layer[radar].started, true);showradar();"
    keep="true"/>

  <action name="radarOnNewPano">
    if(scene[get(xml.scene)].planar,
      set(layer[radar].active, false);
      hideradar();
    ,
      set(layer[radar].active, true);
      set(layer[radar].heading, get(scene[get(xml.scene)].heading));
      showradar();
    );
  </action>

  <action name="hideradar">set(layer[radar].visible, false);</action>
  <action name="showradar">if(tour_displaycontrols,if(layer[radar].active AND layer[radar].started,set(layer[radar].visible, true););,hideradar(););</action>

<!-- ********** -->
<!-- Mapa button -->
<!-- id : togglebutton -->
<!-- ********** -->



  <layer name="togglebutton"
         keep="true"
         url="%FIRSTXML%/graphics/togglebutton/map_on.png" 
         align="topright"
         x="10"
         y="10"
         zorder="10"
         tooltip=""
         onhover="togglebuttonOnHover"
         state="true"
         onclick="togglebuttonOnClick"
         onout="hideTooltip();"
         height="84"
         width="125"
         visible="false"
         />

  <action name="togglebuttonOnHover">
    if (state,
      set(tooltip, togglebuttonfirsttooltip);
     ,
      set(tooltip, togglebuttonsecondtooltip);
    );
    if (tooltip != "", showTooltip('plugin'););
  </action>
  <action name="togglebuttonOnClick">
    if (state,
      set(state, false);showMap();


      set(url,%FIRSTXML%/graphics/togglebutton/map_off.png);
     ,
      set(state, true);hideMap();


      set(url,%FIRSTXML%/graphics/togglebutton/map_on.png);
    );
  </action>

  <events name="togglebuttonevents" 
    onTourStart="showtogglebutton();"
    hidetourcontrols="hidetogglebutton();" 
    showtourcontrols="showtogglebutton();" 
    keep="true" />
  <action name="hidetogglebutton">set(layer[togglebutton].visible, false);</action>
  <action name="showtogglebutton">if(tour_displaycontrols,set(layer[togglebutton].visible, true);,hidetogglebutton(););</action>


<!-- ********** -->
<!-- Footer -->
<!-- id : footer -->
<!-- ********** -->

  <layer name="footer"
         keep="true"
         url="%FIRSTXML%/graphics/footer/banner.png" 
         align="bottomright"
         x="0"
         y="0"
         zorder="11"
         enabled="false"
         capture="true"
         visible="false"
         height="16"
         width="36%"
         
         />

  <events name="footerevents" 
    onTourStart="showfooter();"
    hidetourcontrols="hidefooter();"
    showtourcontrols="showfooter();"
    keep="true" />

  <action name="hidefooter">
    set(layer[footer].visible, false);
  </action>
  <action name="showfooter">
    set(layer[footer].visible, true);
  </action>

  <!-- ************* -->
  <!-- Panorama Menu -->
  <!-- ************* -->

<ptplugin name="panoramaMenu" engine="kolorMenu">
	<settings>
		<option name="position" value="top" type="string" />
		<option name="orientation" value="horizontal" type="string" />
		<option name="sub_orientation" value="vertical" type="string" />
		<option name="margin_x" value="5" type="int" />
		<option name="margin_y" value="2" type="int" />
		<option name="background_color" value="4b4b4b" type="string" />
		<option name="background_alpha" value="1" type="float" />
		<option name="item_spacer" value="5" type="int" />
		<option name="border_radius" value="4" type="int" />
		<option name="full_size" value="false" type="bool" />
		<option name="use_out_effect" value="true" type="bool" />
		<option name="item_out_border_radius" value="4" type="int" />
		<option name="item_hover_border_radius" value="4" type="int" />
		<option name="item_out_border_width" value="0" type="int" />
		<option name="item_hover_border_width" value="0" type="int" />
		<option name="item_out_bg_color" value="4b4b4b" type="string" />
		<option name="item_out_bg_alpha" value="1" type="float" />
		<option name="item_out_font_color" value="d6d6d6" type="string" />
		<option name="item_out_font_family" value="Arial" type="string" />
		<option name="item_out_font_size" value="12" type="int" />
		<option name="item_out_font_weight" value="bold" type="string" />
		<option name="item_out_font_style" value="normal" type="string" />
		<option name="item_out_font_decoration" value="normal" type="string" />
		<option name="use_hover_effect" value="true" type="bool" />
		<option name="item_hover_bg_color" value="3e3e3e" type="string" />
		<option name="item_hover_bg_alpha" value="1" type="float" />
		<option name="item_hover_font_color" value="d6d6d6" type="string" />
		<option name="item_hover_font_family" value="Arial" type="string" />
		<option name="item_hover_font_size" value="12" type="int" />
		<option name="item_hover_font_weight" value="bold" type="string" />
		<option name="item_hover_font_style" value="normal" type="string" />
		<option name="item_hover_font_decoration" value="normal" type="string" />
		<option name="padding_main" value="10" type="int" />
		<option name="padding_sub" value="10" type="int" />
		<option name="text_align" value="top" type="string" />
		<option name="item_thumb_max_width" value="100" type="int" />
		<option name="item_thumb_max_height" value="60" type="int" />
		
		<option name="zorder" value="12" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	<internaldata>
				<group name="group_1"
						titleID="panogroup206_title"
						thumbnail=""
						subMenu="true"
						cssClass="panogroup206"> 

				
				
						<item name="group_1_item_1"
							action="invokeKrFunction('mainloadscene', 'pano188')"
								titleID="pano188_title"
								thumbnail="macedodata/chacim_188/thumbnail.jpg"
							cssClass="pano188">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_2"
							action="invokeKrFunction('mainloadscene', 'pano203')"
								titleID="pano203_title"
								thumbnail="macedodata/_group_1__g0330858_g_203/thumbnail.jpg"
							cssClass="pano203">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_3"
							action="invokeKrFunction('mainloadscene', 'pano275')"
								titleID="pano275_title"
								thumbnail="macedodata/serra_nogueira_275/thumbnail.jpg"
							cssClass="pano275">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_4"
							action="invokeKrFunction('mainloadscene', 'pano223')"
								titleID="pano223_title"
								thumbnail="macedodata/rio_tuela_223/thumbnail.jpg"
							cssClass="pano223">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_5"
							action="invokeKrFunction('mainloadscene', 'pano226')"
								titleID="pano226_title"
								thumbnail="macedodata/cubo_azibo_226/thumbnail.jpg"
							cssClass="pano226">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_6"
							action="invokeKrFunction('mainloadscene', 'pano229')"
								titleID="pano229_title"
								thumbnail="macedodata/decontinuidades_229/thumbnail.jpg"
							cssClass="pano229">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_7"
							action="invokeKrFunction('mainloadscene', 'pano380')"
								titleID="pano380_title"
								thumbnail="macedodata/decontinuidades_geol_380/thumbnail.jpg"
							cssClass="pano380">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_8"
							action="invokeKrFunction('mainloadscene', 'pano232')"
								titleID="pano232_title"
								thumbnail="macedodata/gneisses_de_lagoa_232/thumbnail.jpg"
							cssClass="pano232">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_9"
							action="invokeKrFunction('mainloadscene', 'pano189')"
								titleID="pano189_title"
								thumbnail="macedodata/vilares_de_vilarica_189/thumbnail.jpg"
							cssClass="pano189">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_1_item_10"
							action="invokeKrFunction('mainloadscene', 'pano323')"
								titleID="pano323_title"
								thumbnail="macedodata/minas_de_murcos_323/thumbnail.jpg"
							cssClass="pano323">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
					
						<option name="background_color" value="808080" type="string" />
						<option name="background_alpha" value="1" type="float" />
				
				</group>
				<group name="group_2"
						titleID="panogroup22_title"
						thumbnail=""
						subMenu="true"
						cssClass="panogroup22"> 

				
				
						<item name="group_2_item_1"
							action="invokeKrFunction('mainloadscene', 'pano21')"
								titleID="pano21_title"
								thumbnail="macedodata/_group_0__11470040_1_21/thumbnail.jpg"
							cssClass="pano21">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_2_item_2"
							action="invokeKrFunction('mainloadscene', 'pano153')"
								titleID="pano153_title"
								thumbnail="macedodata/laje_branca3_editada_153/thumbnail.jpg"
							cssClass="pano153">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_2_item_3"
							action="invokeKrFunction('mainloadscene', 'pano435')"
								titleID="pano435_title"
								thumbnail="macedodata/_group_0__dji_0316_d_435/thumbnail.jpg"
							cssClass="pano435">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_2_item_4"
							action="invokeKrFunction('mainloadscene', 'pano438')"
								titleID="pano438_title"
								thumbnail="macedodata/penedo_do_boi_pano1__438/thumbnail.jpg"
							cssClass="pano438">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
						<item name="group_2_item_5"
							action="invokeKrFunction('mainloadscene', 'pano440')"
								titleID="pano440_title"
								thumbnail="macedodata/casa_de_pedra5_440/thumbnail.jpg"
							cssClass="pano440">
						
								<option name="item_out_bg_color" value="808080" type="string" />
								<option name="item_out_bg_alpha" value="1" type="float" />
								<option name="item_hover_bg_color" value="6b6b6b" type="string" />
								<option name="item_hover_bg_alpha" value="1" type="float" />
						
						</item>
					
						<option name="background_color" value="808080" type="string" />
						<option name="background_alpha" value="1" type="float" />
				
				</group>
	</internaldata>
</ptplugin>

<action name="kolorMenuJsReady_panoramaMenu">
	set(ptplugin[panoramaMenu].jsready, true);
</action>

<action name="showKolorMenu_panoramaMenu">
	
	ifnot(ptplugin[panoramaMenu].isOpen,
		stopdelayedcall(delay_panoramaMenu);
		set(ptplugin[panoramaMenu].isOpen, true);
		set(ptplugin[panoramaMenu].displayed, true);
		js(openKolorMenu(panoramaMenu));
	,
		if(ptplugin[panoramaMenu].jsready,
			stopdelayedcall(delay_panoramaMenu);
			set(ptplugin[panoramaMenu].displayed, true);
			js(invokePluginFunction(panoramaMenu, showKolorMenu));
		,
			delayedcall(delay_panoramaMenu, 0.1, showKolorMenu_panoramaMenu(););
		);
	);
</action>

<action name="hideKolorMenu_panoramaMenu">
	if(ptplugin[panoramaMenu].jsready,
		stopdelayedcall(delay_panoramaMenu);
		set(ptplugin[panoramaMenu].displayed, false);
		js(invokePluginFunction(panoramaMenu, hideKolorMenu));
	,
		delayedcall(delay_panoramaMenu, 0.1, hideKolorMenu_panoramaMenu(););
	);
</action>


<action name="changeLanguage_panoramaMenu">
	if(ptplugin[panoramaMenu].jsready,
		stopdelayedcall(delay_panoramaMenu);
		js(invokePluginFunction(panoramaMenu, changeLanguage));
	,
		delayedcall(delay_panoramaMenu, 0.1, changeLanguage_panoramaMenu(););
	);
</action>


<events name="kolorMenuEvents_panoramaMenu" 
	keep="true"
	
	
	onTourStart="showKolorMenu_panoramaMenu();"
	changetourlanguage="changeLanguage_panoramaMenu"
/>

<!-- ********** -->
<!-- Website Box -->
<!-- id : websiteViewer -->
<!-- ********** -->

<ptplugin name="websiteViewer" engine="kolorBox">
	<settings>
		<option name="position" value="center" type="string" />
		<option name="margin_x" value="0" type="int" />
		<option name="margin_y" value="0" type="int" />
		<option name="external_padding" value="10" type="int" />
		<option name="draggable_box" value="true" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_width" value="100" type="int" />
		<option name="container_width_unit" value="percent" type="string" />
		<option name="container_height" value="100" type="int" />
		<option name="container_height_unit" value="percent" type="string" />
		<option name="container_color" value="c7c7c7" type="string" />
		<option name="container_alpha" value="0.80000000000000004" type="float" />
		<option name="container_topleft_border_radius" value="10" type="int" />
		<option name="container_topright_border_radius" value="10" type="int" />
		<option name="container_bottomleft_border_radius" value="10" type="int" />
		<option name="container_bottomright_border_radius" value="10" type="int" />
		<option name="container_border_width" value="1" type="int" />
		<option name="container_border_color" value="000000" type="string" />
		<option name="container_border_alpha" value="1" type="float" />
		<option name="overlay_displayed" value="true" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="title_displayed" value="true" type="bool" />
		<option name="title_position" value="top" type="string" />
		<option name="title_font" value="Arial" type="string" />
		<option name="title_size" value="20" type="int" />
		<option name="title_weight" value="bold" type="string" />
		<option name="title_style" value="normal" type="string" />
		<option name="title_decoration" value="none" type="string" />
		<option name="title_color" value="000000" type="string" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="iframe_scrolling" value="auto" type="string" />
		<option name="iframe_default_width" value="950" type="int" />
		<option name="iframe_default_height" value="700" type="int" />
		<option name="iframe_devices_width" value="800" type="int" />
		<option name="iframe_devices_height" value="500" type="int" />
		<option name="force_ios_scrolling" value="true" type="bool" />
		<option name="fullscreen_displayed" value="true" type="bool" />
		<option name="fullscreen_position" value="topleft" type="string" />
		<option name="fullscreen_text" value="websiteViewerfullscreen_text" type="string" />




		<option name="close_displayed" value="true" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_text" value="websiteViewerclose_text" type="string" />

		<option name="close_callback" value="invokeKrFunction('closeKolorBoxCallback_websiteViewer')" type="string" />
		<option name="zorder" value="13" type="int" />
		<option name="use_i18n" value="true" type="bool" />
	</settings>
	<internaldata>
		
	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady_websiteViewer">
	set(ptplugin[websiteViewer].jsready, true);
</action>

<action name="openWebsite_websiteViewer">
	ifnot(ptplugin[websiteViewer].isOpen,
		if(ptplugin[websiteViewer].doNotDeleteMe,
			set(ptplugin[websiteViewer].currentCall, false);
		set(ptplugin[websiteViewer].isOpen, true);
		set(ptplugin[websiteViewer].doNotDeleteMe, false);
		getmessage(websiteViewer_boxurl, %1);
		txtadd(websiteViewer_boxurl, ?iframe=true);
		pauseautorotation(forceplugin);

		js(invokePluginFunction(websiteViewer, loadSingleArrayItem, get(websiteViewer_boxurl), %2));
		,
			set(ptplugin[websiteViewer].currentCall, true);
			set(ptplugin[websiteViewer].doNotDeleteMe, true);
			events.dispatch(onremovedisplayedobject);
			delayedcall(0.3,openWebsite_websiteViewer(%1,%2););
		);
	,
		if('%1' != websiteViewer_boxurl,
			closeKolorBox_websiteViewer();
			delayedcall(0.3,openWebsite_websiteViewer(%1,%2););
		);
	);
</action>

<action name="toggleWebsite_websiteViewer">
	js(invokePluginFunction(websiteViewer, toggleKolorBox, %1));
</action>


<action name="closeKolorBox_websiteViewer">
	if(ptplugin[websiteViewer].doNotDeleteMe,
		set(ptplugin[websiteViewer].doNotDeleteMe, false);
	,
	js(invokePluginFunction(websiteViewer, closeKolorBox));
	);
</action>

<action name="closeKolorBoxCallback_websiteViewer">
	resumeautorotation(forceplugin);

	set(ptplugin[websiteViewer].doNotDeleteMe, false);
	set(ptplugin[websiteViewer].isOpen, false);
</action>

<action name="changeLanguage_websiteViewer">
	if(ptplugin[websiteViewer].jsready,
		stopdelayedcall(delay_websiteViewer);
		js(invokePluginFunction(websiteViewer, changeLanguage));
	,
		delayedcall(delay_websiteViewer, 0.1, changeLanguage_websiteViewer(););
	);
</action>

<events name="kolorBoxEvents_websiteViewer" 
	keep="true"
	onremovepano="if(ptplugin[websiteViewer].isOpen,closeKolorBox_websiteViewer(););"
	onremovedisplayedobject="ifnot(ptplugin[websiteViewer].currentCall,if(ptplugin[websiteViewer].isOpen,closeKolorBox_websiteViewer();););"
	changetourlanguage="changeLanguage_websiteViewer();"
	/>

  <action name="displayImage">
    if (layer[displayedStandardImage],
      if(layer[displayedStandardImage].doNotDeleteMe,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, false);
        
        if (%1 == layer[displayedStandardImage].url,
          applyDisplayedImageObjectAnimation(%8);
        ,
          setDisplayedImageObjectParameters(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10);
        );
      ,
        set(layer[displayedStandardImage].currentCall, false);
        set(layer[displayedStandardImage].doNotDeleteMe, true);
        events.dispatch(onremovedisplayedobject);
        delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      );
    ,
      if(%10,
        addlayer(displayedStandardImageOverlay);
        set(layer[displayedStandardImageOverlay].keep, false);
        set(layer[displayedStandardImageOverlay].width, 100%);
        set(layer[displayedStandardImageOverlay].height, 100%);
        set(layer[displayedStandardImageOverlay].type, container);
        set(layer[displayedStandardImageOverlay].zorder, 98);
        set(layer[displayedStandardImageOverlay].visible, false);
        set(layer[displayedStandardImageOverlay].onclick, applyDisplayedImageObjectAnimation(%8););
        set(layer[displayedStandardImageOverlay].bgcolor, "0x%11");
        set(layer[displayedStandardImageOverlay].bgalpha, %12);
        set(layer[displayedStandardImageOverlay].bgcapture, true);
      );
      addlayer(displayedStandardImage);
      set(layer[displayedStandardImage].keep, false);
      set(layer[displayedStandardImage].onclick, applyDisplayedImageObjectAnimation(%8););
      set(layer[displayedStandardImage].zorder , 99);
      set(layer[displayedStandardImage].currentCall, true);
      set(layer[displayedStandardImage].doNotDeleteMe, true);
      set(layer[displayedStandardImage].onloaded, resizeDisplayedImageObject());
      events.dispatch(onremovedisplayedobject);
      delayedcall(0.2,displayImage(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12););
      set(layer[displayedStandardImage].visible, false);
    );
  </action>
  <action name="applyDisplayedImageObjectAnimation">resumeautorotation(forcehotspot);

    if (%1,
      stoptween(layer[displayedStandardImage].width, layer[displayedStandardImage].height);
      tween(layer[displayedStandardImage].width|layer[displayedStandardImage].height, 1|1, 1, easeOutQuad, WAIT);
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    ,
      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););removelayer(displayedStandardImage);
    );
  </action>
  <action name="setDisplayedImageObjectParameters">
    set(layer[displayedStandardImage].url       , %1);
    set(layer[displayedStandardImage].align     , %2);
    set(layer[displayedStandardImage].x         , %3);
    set(layer[displayedStandardImage].y         , %4);
    set(layer[displayedStandardImage].imgwidth  , %5);
    set(layer[displayedStandardImage].imgheight , %6);
    set(layer[displayedStandardImage].animated  , %8);
    set(layer[displayedStandardImage].applyratio, %9);
    set(layer[displayedStandardImage].overlay   , %10);
    if (%7,pauseautorotation(forcehotspot);
);
  </action>
  <action name="resizeDisplayedImageObject">
    if(layer[displayedStandardImage].url,
    set(layer[displayedStandardImage].fullwidth, get(layer[displayedStandardImage].width));
    set(layer[displayedStandardImage].fullheight, get(layer[displayedStandardImage].height));
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].width , 1);
      set(layer[displayedStandardImage].height, 1);
    );
    if(layer[displayedStandardImage].imgwidth != "" AND layer[displayedStandardImage].imgheight != "",
      if(layer[displayedStandardImage].imgwidth == "prop",
        set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
        indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
        if(tempDisplayedImageObjectHeightPercent GT 0,
          txtreplace(tempDisplayedImageObjectHeight, '%', '');
          mul(tempDisplayedImageObjectHeight, get(stageheight));
          div(tempDisplayedImageObjectHeight, 100);
          Math.round(tempDisplayedImageObjectHeight);
        );
        mul(flyingImgWidth,get(layer[displayedStandardImage].fullwidth),get(tempDisplayedImageObjectHeight));
        div(flyingImgWidth,get(layer[displayedStandardImage].fullheight));
        Math.round(flyingImgWidth);
        set(layer[displayedStandardImage].imgwidth , get(flyingImgWidth));
        set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
      ,
        if(layer[displayedStandardImage].imgheight == "prop",
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          mul(flyingImgHeight,get(layer[displayedStandardImage].fullheight),get(tempDisplayedImageObjectWidth));
          div(flyingImgHeight,get(layer[displayedStandardImage].fullwidth));
          Math.round(flyingImgHeight);
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight , get(flyingImgHeight));
        ,
          set(tempDisplayedImageObjectWidth, get(layer[displayedStandardImage].imgwidth));
          set(tempDisplayedImageObjectHeight, get(layer[displayedStandardImage].imgheight));
          indexoftxt(tempDisplayedImageObjectWidthPercent, get(tempDisplayedImageObjectWidth), "%");
          indexoftxt(tempDisplayedImageObjectHeightPercent, get(tempDisplayedImageObjectHeight), "%");
          if(tempDisplayedImageObjectWidthPercent GT 0,
            txtreplace(tempDisplayedImageObjectWidth, '%', '');
            mul(tempDisplayedImageObjectWidth, get(stagewidth));
            div(tempDisplayedImageObjectWidth, 100);
            Math.round(tempDisplayedImageObjectWidth);
          );
          if(tempDisplayedImageObjectHeightPercent GT 0,
            txtreplace(tempDisplayedImageObjectHeight, '%', '');
            mul(tempDisplayedImageObjectHeight, get(stageheight));
            div(tempDisplayedImageObjectHeight, 100);
            Math.round(tempDisplayedImageObjectHeight);
          );
          set(layer[displayedStandardImage].imgwidth , get(tempDisplayedImageObjectWidth));
          set(layer[displayedStandardImage].imgheight, get(tempDisplayedImageObjectHeight));
        );
      );
    ,
      set(layer[displayedStandardImage].imgwidth , get(layer[displayedStandardImage].fullwidth));
      set(layer[displayedStandardImage].imgheight, get(layer[displayedStandardImage].fullheight));
    );
    
    set(resizedwidth, get(layer[displayedStandardImage].imgwidth));
    set(resizedheight, get(layer[displayedStandardImage].imgheight));
    if(layer[displayedStandardImage].applyratio,
      sub(resizedstagewidth, get(stagewidth), get(layer[displayedStandardImage].x));
      sub(resizedstageheight, get(stageheight), get(layer[displayedStandardImage].y));
      Math.abs(resizedstagewidth);
      Math.abs(resizedstageheight);
      if(resizedwidth GT resizedstagewidth,
        mul(tempresizedheight, get(resizedheight), get(resizedstagewidth));
        div(tempresizedheight, get(resizedwidth));
        Math.round(tempresizedheight);
        set(resizedwidth, get(resizedstagewidth));
        set(resizedheight, get(tempresizedheight));
      );
      if(resizedheight GT resizedstageheight,
        mul(tempresizedwidth, get(resizedwidth), get(resizedstageheight));
        div(tempresizedwidth, get(resizedheight));
        Math.round(tempresizedwidth);
        set(resizedheight, get(resizedstageheight));
        set(resizedwidth, get(tempresizedwidth));
      );
    );
    
    if(layer[displayedStandardImage].animated,
      set(layer[displayedStandardImage].animated, false);
      tween(layer[displayedStandardImage].width , get(resizedwidth), 1, easeOutQuad);
      tween(layer[displayedStandardImage].height, get(resizedheight), 1, easeOutQuad);
    ,
      set(layer[displayedStandardImage].width , get(resizedwidth));
      set(layer[displayedStandardImage].height, get(resizedheight));
    );
    if(layer[displayedStandardImage].overlay,set(layer[displayedStandardImageOverlay].visible, true););
    set(layer[displayedStandardImage].visible, true);
    ,
      delayedcall(0.2,resizeDisplayedImageObject(););
    );
  </action>
  <events name="displayedImageObjectEvents" keep="true" onremovedisplayedobject="displayedImageObjectOnRemoveDisplayedObject" onresize="if(layer[displayedStandardImage],resizeDisplayedImageObject());" />
  <action name="displayedImageObjectOnRemoveDisplayedObject">
    ifnot(layer[displayedStandardImage].currentCall,if(layer[displayedStandardImage].visible,resumeautorotation(forcehotspot);

      if(layer[displayedStandardImage].overlay,removelayer(displayedStandardImageOverlay););
      removelayer(displayedStandardImage);
    ););
  </action>


  <!-- Fullscreen Management -->
  <action name="exitFullScreen" devices="fullscreensupport">set(tour_fullscreen,false);js(setFullscreen(false));</action>
  <action name="enterFullScreen" devices="fullscreensupport">set(tour_fullscreen,true);js(setFullscreen(true));</action>
  <action name="switchFullScreen">if(tour_fullscreen,exitFullScreen();,enterFullScreen(););</action>

  
  <events name="krpanoExitFullscreenEvent"
    onexitfullscreen="if(tour_fullscreen,exitFullScreenChangeEvent(););"
    keep="true" />

  <action name="exitFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,false);events.dispatch(onexitfullscreen);</action>
  <action name="enterFullScreenChangeEvent" devices="fullscreensupport">set(tour_fullscreen,true);events.dispatch(onenterfullscreen);</action>
  <action name="exitFullScreenFallback">set(fullscreen,false);</action>
  <action name="enterFullScreenFallback">set(fullscreen,true);</action>
  
  <action name="resizeFullScreenEvent">delayedcall(0,updatescreen(););</action>

  <!-- Sounds Management -->

  <action name="play3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, playpanolocalsounds();););
  </action>
  <action name="stop3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, stoppanolocalsounds();););
  </action>
  <action name="resume3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, 
      set(kill3dSoundOnResume, true);
      if(layer[displayedStandardVideo],
      if(layer[displayedStandardVideo].pausebgsound,
      if(tour_current_played_video,
        set(kill3dSoundOnResume, false);
      );););
      if(layer[webvideodisplay_player],
      if(layer[webvideodisplay_player].pausebgsound,
      if(tour_current_played_web_video,
        set(kill3dSoundOnResume, false);
      );););
      if(tour_current_played_sound_pausesound,
      if(tour_current_played_sound,
        set(kill3dSoundOnResume, false);
      ););
      if(kill3dSoundOnResume,
        resumepanolocalsounds();
      );
    ););
  </action>
  <action name="pause3DLocalSounds">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, pausepanolocalsounds();););
  </action>
  <action name="set3DLocalSoundsVolume">
    if (xml.scene, if (scene[get(xml.scene)].haslocalsounds, setpanolocalsoundsvolume();););
  </action>
  <action name="playTourSounds">
    set(tour_soundson, true);events.dispatch(playtoursoundsevent);
    resumeTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="stopTourSounds">
    set(tour_soundson, false);events.dispatch(stoptoursoundsevent);
    pauseTourSoundsActions(true,true,true,true,true);
  </action>
  <action name="setTourSoundsVolume">
    set(tour_soundsvolume, %1);events.dispatch(changetoursoundsevent);
    set3DLocalSoundsVolume();
  </action>
  <action name="playTourSoundsActions">
    if(%1,
        play3DLocalSounds();
    );
  </action>
  <action name="stopTourSoundsActions">
    if(%1,
      stop3DLocalSounds();
    );
    if(%3,
      stopVideoActionsSounds();
    );
  </action>
  <action name="resumeTourSoundsActions">
    if(%1,
        resume3DLocalSounds();
    );
    if(%3,
      resumeVideoActionsSounds();
    );
  </action>
  <action name="pauseTourSoundsActions">
    if(%1,
      pause3DLocalSounds();
    );
    if(%3,
      pauseVideoActionsSounds();
    );
  </action>
  <action name="stopVideoActionsSounds">
    if(tour_current_played_video,
      if(layer[displayedStandardVideo],
        layer[displayedStandardVideo].stop();
        removelayer(displayedStandardVideo);
        if(layer[displayedStandardVideoOverlayButton], removelayer(displayedStandardVideoOverlayButton); );
        if(layer[displayedStandardVideoOverlay], removelayer(displayedStandardVideoOverlay); );
        delete(tour_current_played_video);
        set(tour_current_played_video_state, 0);
      );
    );
    if(tour_current_played_web_video,
      displayWebVideoObjectClose();
    );
  </action>
  <action name="resumeVideoActionsSounds">
    if(tour_current_played_video,
      set(resumeVideoActionsVerification, true);
      if(tour_current_played_sound,
        if(tour_current_played_video_state LT tour_current_played_sound_state,
          set(resumeVideoActionsVerification, false);
        );
      );
      if(resumeVideoActionsVerification,
        if (tour_soundson,
          div(volume, tour_soundsvolume, 100);
          if(device.flash OR (device.webgl AND !device.ios),
            set(layer[displayedStandardVideo].volume, get(volume));
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.startVideosSounds(get(volume)));
            );
          );
        ,
          if(device.flash OR (device.webgl AND !device.ios),
            set(layer[displayedStandardVideo].volume, 0);
          ,
            ifnot(device.ios,
              js(kpanotour.Sounds.stopVideosSounds());
            );
          );
        );
      );
    );
  </action>
  <action name="pauseVideoActionsSounds">
    if(tour_current_played_video,
      if(device.flash OR (device.webgl AND !device.ios),
        set(layer[displayedStandardVideo].volume, 0);
      ,
        ifnot(device.ios,
          js(kpanotour.Sounds.stopVideosSounds());
        );
      );
    );
  </action>

  <!-- Hide / Show Controls -->
  <action name="hideTourControls">set(tour_displaycontrols, false);events.dispatch(hidetourcontrols);</action>
  <action name="showTourControls">set(tour_displaycontrols, true); events.dispatch(showtourcontrols);</action>


  <!-- MAP -->
  <action name="hideMap">set(tour_displaymap, false);events.dispatch(onhidetourmap);</action>
  <action name="showMap">set(tour_displaymap, true); events.dispatch(onshowtourmap);</action>

  <action name="enableGyroscope">
    changeGyroscopeState(true);
  </action>
  <action name="disableGyroscope">
    changeGyroscopeState(false);
  </action>


<action name="viewControlMoveUp">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(isfullvertical == false AND calc(view.vlookat-%2) LT view.vlookatmin,
				moveto(get(view.hlookat), get(view.vlookatmin));
			,
				moveto(get(view.hlookat), calc(view.vlookat-%2));
			);
		,
			set(vlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveDown">
	if(%1,
		if(%2,
			set(isfullvertical, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewvfov, panoview.vmax, panoview.vmin);
				if (viewvfov == 180,
					set(isfullvertical, true);
				);
			);
			if(sceneisfull360 == false AND calc(view.vlookat+%2) GT view.vlookatmax,
				moveto(get(view.hlookat), get(view.vlookatmax));
			,
				moveto(get(view.hlookat), calc(view.vlookat+%2));
			);
		,
			set(vlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveVertStop());
		);
	,
		set(vlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveLeft">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat-%2) LT view.hlookatmin,
				moveto(get(view.hlookatmin), get(view.vlookat));
			,
				moveto(calc(view.hlookat-%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, -1);
			delayedcall(0.1, viewControlMoveHoriStop());
		);
	,
		set(hlookat_moveforce, -1);
	);
</action>
<action name="viewControlMoveRight">
	if(%1,
		if(%2,
			set(isfullhorizontal, false);
			ifnot(scene[get(xml.scene)].planar,
				sub(viewhfov, panoview.hmax, panoview.hmin);
				if (viewhfov == 360,
					set(isfullhorizontal, true);
				);
			);
			if(isfullhorizontal == false AND calc(view.hlookat+%2) GT view.hlookatmax,
				moveto(get(view.hlookatmax), get(view.vlookat));
			,
				moveto(calc(view.hlookat+%2), get(view.vlookat));
			);
		,
			set(hlookat_moveforce, +1);
			delayedcall(0.1, viewControlMoveHoriStop());
			
		);
	,
		set(hlookat_moveforce, +1);
	);
</action>
<action name="viewControlMoveHoriStop">
	set(hlookat_moveforce, 0);
</action>
<action name="viewControlMoveVertStop">
	set(vlookat_moveforce, 0);
</action>

<action name="viewControlZoomIn">
	if(%1,
		if(%2,
			if(%2 LT view.fovmin,
				zoomto(get(view.fovmin));
			,
				if(%2 LT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, -1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, -1);
	);
</action>
<action name="viewControlZoomOut">
	if(%1,
		if(%2,
			if(%2 GT view.fovmax,
				zoomto(get(view.fovmax));
			,
				if(%2 GT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, +1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, +1);
	);
</action>
<action name="viewControlZoomStop">
	set(fov_moveforce, 0);
</action>

</krpano>