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

    
  <!-- Spot Style - Default Point Spot Style -->


  <style name="IconDefaultPointSpotStyle"
         url="%FIRSTXML%/spots/hotspot_image_user_defaultpoint0.png"
         visible="false"
         edge="center"
         onhover="onhoverIconDefaultPointSpotStyle"
         onout="onoutIconDefaultPointSpotStyle"


         />
  <action name="onhoverIconDefaultPointSpotStyle">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle">
    hideTooltip();



  </action>



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


    
  <!-- Spot Style - Default Point Spot Style 1 -->


  <style name="IconDefaultPointSpotStyle1"
         url="%FIRSTXML%/spots/hotspot_video_user_defaultpoint1.png"
         visible="false"
         edge="center"
         onhover="onhoverIconDefaultPointSpotStyle1"
         onout="onoutIconDefaultPointSpotStyle1"


         />
  <action name="onhoverIconDefaultPointSpotStyle1">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle1">
    hideTooltip();



  </action>



    
  <!-- Spot Style - Default Point Spot Style 2 -->


  <style name="IconDefaultPointSpotStyle2"
         url="%FIRSTXML%/spots/hotspot_information_user_defaultpoint2.png"
         visible="false"
         edge="center"
         onhover="onhoverIconDefaultPointSpotStyle2"
         onout="onoutIconDefaultPointSpotStyle2"


         />
  <action name="onhoverIconDefaultPointSpotStyle2">
    showtooltip('hotspot');
  </action>
  <action name="onoutIconDefaultPointSpotStyle2">
    hideTooltip();



  </action>



<!-- ********** -->
<!-- Sans Control Bar -->
<!-- id : SansControlBar -->
<!-- ********** -->

  <krpano SansControlBarbarbuilt="false" SansControlBarbackgroundwidthwhenclosed="0" SansControlBarbackgroundwidthwhenopened="0" SansControlBarIsOpened="false" />
  <events name="SansControlBarevents" 
    onxmlcomplete="SansControlBarbuildMenuBar();" 


    keep="true" />



  <action name="SansControlBarbuildMenuBar">
    ifnot (SansControlBarbarbuilt, SansControlBarbuildMenu(); set(SansControlBarbarbuilt, true););
  </action>

  <style name="SansControlBar_btn_style"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         crop="0|0|60|60"
         onovercrop="0|60|60|60"
         ondowncrop="0|120|60|60"
         onhover="showTooltip('plugin', SansControlBarmenuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />
  <style name="SansControlBar_btn_style_off"
         keep="true"
         edge="right"
         align="right"
         x="0" y="0"
         width="40" height="40"
         onhover="showTooltip('plugin', SansControlBarmenuTooltipStyle, bottom);"
         onout="hideTooltip();"
         />

  <layer name="SansControlBar_menu_bg"
         keep="true"
         type="container"
         zorder="1"
         width="40"
         height="40"
         align="bottom"
         x="0" y="10"
         maskchildren="true"
         rotate="0"
         visible="false"
         >

    <layer name="SansControlBarbtn_enter_vr"
            url="%FIRSTXML%/graphics/sans controlbar/btn_vr_mode.png"
            style="SansControlBar_btn_style"
            onclick="if(scene[get(xml.scene)].full360 AND disableCurrentSceneVrConservation !== true,
    js(accessWebVr(get(xml.scene),get(videoscenestarttime)));
,
    js(accessWebVr(null));
);"
            tooltip="SansControlBarenterVRTip"
            visible="false"
            devices="html5"
            />
    <layer name="SansControlBarbtn_enter_vr_not"
            url="%FIRSTXML%/graphics/sans controlbar/btn_vr_mode_off.png"
            style="SansControlBar_btn_style"
            tooltip="SansControlBarenterVRNotTip"
            enabled="true"
            capture="false"
            visible="false"
            devices="html5"
            />

    <layer name="SansControlBarbtn_in"
            url="%FIRSTXML%/graphics/sans controlbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarzoomInTip"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_out"
            url="%FIRSTXML%/graphics/sans controlbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarzoomOutTip"
            devices="desktop"
            />

    <layer name="SansControlBarbtn_left"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_left.png"
            ondown="viewControlMoveLeft(false);
"
            onup="viewControlMoveHoriStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarmoveLeftTip"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_right"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_right.png"
            ondown="viewControlMoveRight(false);
"
            onup="viewControlMoveHoriStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarmoveRightTip"
            devices="desktop"
            />

    <layer name="SansControlBarbtn_up"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_up.png"
            ondown="viewControlMoveUp(false);
"
            onup="viewControlMoveVertStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarmoveUpTip"
            devices="desktop"
            />
    <layer name="SansControlBarbtn_down"
            url="%FIRSTXML%/graphics/sans controlbar/btn_move_down.png"
            ondown="viewControlMoveDown(false);
"
            onup="viewControlMoveVertStop();
"
            style="SansControlBar_btn_style"
            visible="false"
            tooltip="SansControlBarmoveDownTip"
            devices="desktop"
            />



    <layer name="SansControlBarbtn_prev_pano"
            url="%FIRSTXML%/graphics/sans controlbar/btn_previous_scene.png"
            onclick="loadPreviousScene();
"
            style="SansControlBar_btn_style"
            tooltip="SansControlBarprevSceneTip"
            visible="false"
            />
    <layer name="SansControlBarbtn_next_pano"
            url="%FIRSTXML%/graphics/sans controlbar/btn_next_scene.png"
            onclick="loadNextScene();
"
            style="SansControlBar_btn_style"
            tooltip="SansControlBarnextSceneTip"
            visible="false"
            />



    <layer name="SansControlBarbtn_openfs"
            url="%FIRSTXML%/graphics/sans controlbar/btn_enter_fs.png"
            onclick="enterFullscreen();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="SansControlBaropenFsTip"
            />
    <layer name="SansControlBarbtn_closefs"
            url="%FIRSTXML%/graphics/sans controlbar/btn_close_fs.png"
            onclick="exitFullscreen();
"
            style="SansControlBar_btn_style"
            visible="false"
            devices="fullscreensupport"
            tooltip="SansControlBarcloseFsTip"
            />



    <layer name="SansControlBarbtn_display_help"
            url="%FIRSTXML%/graphics/sans controlbar/btn_help.png"
            onclick="SansControlBardisplayHelp();"
            style="SansControlBar_btn_style"
            devices="desktop"
            visible="false"
            tooltip="SansControlBardisplayHelpTip"
            />
    <layer name="SansControlBarbtn_close_help"
            url="%FIRSTXML%/graphics/sans controlbar/btn_help.png"
            onclick="SansControlBarcloseHelp();"
            style="SansControlBar_btn_style"
            visible="false"
            devices="desktop"
            tooltip="SansControlBarhideHelpTip"
            />



    <layer name="SansControlBarbtn_hidecontrols"
           url="%FIRSTXML%/graphics/sans controlbar/btn_hide_controls.png"
           style="SansControlBar_btn_style"
           onclick="SansControlBarhideMenuControls();hideTourControls();
"
           visible="false"
           tooltip="SansControlBarhideControlsTip"
           />
    <layer name="SansControlBarbtn_showcontrols"
           url="%FIRSTXML%/graphics/sans controlbar/btn_show_controls.png"
           style="SansControlBar_btn_style"
           onclick="SansControlBarshowMenuControls();showTourControls();
"
           tooltip="SansControlBardisplayControlsTip"
           visible="false"
           />
 </layer>



<events name="SansControlBarvravailableevent"
		onvravailable="SansControlBarupdateVrButtonsAvailability();"
		onvrunavailable="SansControlBarupdateVrButtonsAvailability();"
		keep="true" devices="html5" />
	<krpano SansControlBarmenuvravailable="false" />
	<action name="SansControlBarupdateVrButtonsAvailability">
		if (tour_vrdevices,
			set(SansControlBarmenuvravailable, true);
		,
			set(SansControlBarmenuvravailable, false);
		);
		SansControlBarupdateVrButtons();
	</action>
	<action name="SansControlBarHideVrButtons">
		set(layer[SansControlBarbtn_enter_vr].visible, false);
		if('%1' == 'true' AND plugin[ptpvrmode],
			set(layer[SansControlBarbtn_enter_vr_not].visible, true);
		,
			set(layer[SansControlBarbtn_enter_vr_not].visible, false);
		);
	</action>
	<action name="SansControlBarShowVrButtons">
		if (SansControlBarmenuvravailable,
			set(layer[SansControlBarbtn_enter_vr].visible, true);
			set(layer[SansControlBarbtn_enter_vr_not].visible, false);
		,
			SansControlBarHideVrButtons(true);
		);
	</action>
	<action name="SansControlBarupdateVrButtons">
	if (tour_vrdevices,
		if (SansControlBarIsOpened,
			SansControlBarShowVrButtons();
		,
			SansControlBarHideVrButtons();
		);
	,
		if (SansControlBarIsOpened,
			SansControlBarHideVrButtons(true);
		,
			SansControlBarHideVrButtons();
		);
	);
	</action>



  <action name="SansControlBarhideMenuControls">
    set(SansControlBarIsOpened, false);
    set(layer[SansControlBarbtn_hidecontrols].visible, false);
    set(layer[SansControlBarbtn_showcontrols].visible, true);
if (scene.count GT 1,
	set(layer[SansControlBarbtn_next_pano].visible, false);
	set(layer[SansControlBarbtn_prev_pano].visible, false);
);


if (device.desktop,
	set(layer[SansControlBarbtn_in].visible, false);
	set(layer[SansControlBarbtn_out].visible, false);
);
if (device.desktop,
	set(layer[SansControlBarbtn_up].visible, false);
	set(layer[SansControlBarbtn_down].visible, false);
);
if (device.desktop,
	set(layer[SansControlBarbtn_left].visible, false);
	set(layer[SansControlBarbtn_right].visible, false);
);
	SansControlBarupdateFullscreenButtons();
	SansControlBarupdateHelpButtons();





	SansControlBarupdateVrButtons();



	set(layer[SansControlBar_menu_bg].width, get(SansControlBarbackgroundwidthwhenclosed));

	set(layer[SansControlBar_menu_bg].visible, true);
  </action>
  <action name="SansControlBarshowMenuControls">
    set(SansControlBarIsOpened, true);
    set(layer[SansControlBarbtn_hidecontrols].visible, true);
    set(layer[SansControlBarbtn_showcontrols].visible, false);
	set(layer[SansControlBar_menu_bg].visible, true);
if (scene.count GT 1,
	set(layer[SansControlBarbtn_next_pano].visible, true);
	set(layer[SansControlBarbtn_prev_pano].visible, true);
);


if (device.desktop,
	set(layer[SansControlBarbtn_in].visible, true);
	set(layer[SansControlBarbtn_out].visible, true);
);
if (device.desktop,
	set(layer[SansControlBarbtn_up].visible, true);
	set(layer[SansControlBarbtn_down].visible, true);
);
if (device.desktop,
	set(layer[SansControlBarbtn_left].visible, true);
	set(layer[SansControlBarbtn_right].visible, true);
);
	SansControlBarupdateFullscreenButtons();
	SansControlBarupdateHelpButtons();



	SansControlBarupdateVrButtons();




    set(layer[SansControlBar_menu_bg].width, get(SansControlBarbackgroundwidthwhenopened));
  </action>

  <layer name="SansControlBarhelpScreenBg"
         align="center"
         keep="true"
         onclick="SansControlBarcloseHelp();"
         url="%FIRSTXML%/graphics/sans controlbar/help_screen_bg.png"
         visible="false"
         rotate="-90"
         height="50%"
         width="prop"
         zorder="97"
         x="100%" />
  <layer name="SansControlBarhelpScreenFg"
         align="center"
         keep="true"
         onclick="SansControlBarcloseHelp();"
         url="%FIRSTXML%/graphics/sans controlbar/help_screen_fg.png"
         height="50%"
         width="prop"
         visible="false"
         rotate="90"
         zorder="98"
         x="-100%"
         displayed="false" />
  <action name="SansControlBardisplayHelp">
  if (device.desktop,
    set(layer[SansControlBarhelpScreenFg].displayed,true);
    set(layer[SansControlBarhelpScreenBg].visible,true);
    set(layer[SansControlBarhelpScreenFg].visible,true);
    tween(layer[SansControlBarhelpScreenFg].rotate,0, 1);
    tween(layer[SansControlBarhelpScreenFg].x,0, 1);
    tween(layer[SansControlBarhelpScreenBg].rotate,0, 1);
    tween(layer[SansControlBarhelpScreenBg].x,0, 1);
    SansControlBarupdateHelpButtons();
  );
  </action>
  <action name="SansControlBarcloseHelp">
  if (device.desktop,
    set(layer[SansControlBarhelpScreenFg].displayed,false);
    tween(layer[SansControlBarhelpScreenFg].rotate,  90, 1, easeOutQuad, set(layer[SansControlBarhelpScreenFg].visible,false););
    tween(layer[SansControlBarhelpScreenFg].x, -100%, 1);
    tween(layer[SansControlBarhelpScreenBg].rotate, -90, 1, easeOutQuad, set(layer[SansControlBarhelpScreenBg].visible,false););
    tween(layer[SansControlBarhelpScreenBg].x, 100%, 1);
    SansControlBarupdateHelpButtons();
  );
  </action>
	<action name="SansControlBarHideHelpButtons">
		set(layer[SansControlBarbtn_display_help].visible, false);
		set(layer[SansControlBarbtn_close_help].visible, false);
	</action>
	<action name="SansControlBarShowHelpButtons">
		if (layer[SansControlBarhelpScreenFg].displayed,
			set(layer[SansControlBarbtn_close_help].visible, true);
			set(layer[SansControlBarbtn_display_help].visible, false);
		,
			set(layer[SansControlBarbtn_display_help].visible, true);
			set(layer[SansControlBarbtn_close_help].visible, false);
		);
	</action>
	<action name="SansControlBarupdateHelpButtons">
	if (device.desktop,
		if (SansControlBarIsOpened,
			SansControlBarShowHelpButtons();
		,
			SansControlBarHideHelpButtons();
		);
	,
		SansControlBarHideHelpButtons();
	);
	</action>




  <events name="SansControlBarmenufullscreenchangeevent"
          onenterfullscreen="SansControlBarupdateFullscreenButtons();"
          onexitfullscreen="SansControlBarupdateFullscreenButtons();"
          keep="true"/>
	<action name="SansControlBarHideFullscreenButtons">
		set(layer[SansControlBarbtn_openfs].visible , false);
		set(layer[SansControlBarbtn_closefs].visible, false);
	</action>
	<action name="SansControlBarShowFullscreenButtons">
		if (device.fullscreensupport,
			if(tour_fullscreen,
				set(layer[SansControlBarbtn_openfs].visible , false);
				set(layer[SansControlBarbtn_closefs].visible, true);
			,
				set(layer[SansControlBarbtn_openfs].visible ,true);
				set(layer[SansControlBarbtn_closefs].visible,false);
			);
		,
			SansControlBarHideFullscreenButtons();
		);
	</action>
	<action name="SansControlBarupdateFullscreenButtons">
		if (SansControlBarIsOpened,
			SansControlBarShowFullscreenButtons();
		,
			SansControlBarHideFullscreenButtons();
		);
	</action>



<layer name="SansControlBarmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	url="%FIRSTXML%/graphics/textfield.swf"
	align="center"
	background="false"
	border="false"
	css="color:#000000;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	height="20"
	autoheight="true"
	autowidth="auto"
	xoffset="0"
	yoffset="0"
	padding="2"
	selectable="false"
	zorder="0"
	visible="false"
	html=""
	edge="bottom"
/>
  <action name="SansControlBarbuildMenu">
    
    set(SansControlBarbutton_pos, 0);

	set(SansControlBarbackgroundwidthwhenclosed, 40);
    set(layer[SansControlBarbtn_hidecontrols].x, get(SansControlBarbutton_pos));
    set(layer[SansControlBarbtn_showcontrols].x, get(SansControlBarbutton_pos));
    inc(SansControlBarbutton_pos, 45);



      if (device.desktop,
        set(layer[SansControlBarbtn_display_help].x, get(SansControlBarbutton_pos));
        set(layer[SansControlBarbtn_close_help].x  , get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

      if (device.fullscreensupport,
        set(layer[SansControlBarbtn_openfs].x , get(SansControlBarbutton_pos));
        set(layer[SansControlBarbtn_closefs].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );






    if(plugin[ptpvrmode] AND device.html5,
      set(layer[SansControlBarbtn_enter_vr].x, get(SansControlBarbutton_pos));
      set(layer[SansControlBarbtn_enter_vr_not].x, get(SansControlBarbutton_pos));
      inc(SansControlBarbutton_pos, 45);
    );



      if (device.desktop,
        set(layer[SansControlBarbtn_right].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_left].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

      if (device.desktop,
        set(layer[SansControlBarbtn_down].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_up].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

      if (device.desktop,
        set(layer[SansControlBarbtn_out].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_in].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );

    if (scene.count GT 1,
        set(layer[SansControlBarbtn_next_pano].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
        set(layer[SansControlBarbtn_prev_pano].x, get(SansControlBarbutton_pos));
        inc(SansControlBarbutton_pos, 45);
      );



      dec(SansControlBarbutton_pos, 5);

      set(SansControlBarbackgroundwidthwhenopened, get(SansControlBarbutton_pos));


    
      set(layer[SansControlBar_menu_bg].width, get(SansControlBarbackgroundwidthwhenopened));
	
	
	
    </action>

	<events name="SansControlBarStartTourEvents" onTourStart="SansControlBarCallOnStartTour();" keep="true" />
	
	<action name="SansControlBarCallOnStartTour">
		
		SansControlBarshowMenuControls();
	</action>



<!-- ********** -->
<!-- Easy HTML Lightbox Plugin -->
<!-- id : easyhtmllightbox -->
<!-- ********** -->
<include url="%FIRSTXML%/graphics/easyhtmllightbox/easy_html_lightbox_vr.xml" />
<plugin name="easy_html_lightbox" url="%FIRSTXML%/graphics/easyhtmllightbox/easy_html_lightbox.js" keep="true" devices="html5" include_reset="false"  include_jquery="false" 
	theme="dark" 
	background_color="#1e1e1e"
	background_alpha="0.59999999999999998"
	stop_autorotate="true"
	apply_blur="true"
	plugin_font_name="inherit"
	info_box_style="style_1_fixed_expanded"
	
	info_box_style_font_name="inherit"
	info_box_style_btn_text="Go To"
	info_box_style_font_size="15"
	info_box_style_image_width="122"

	info_box_style_title_color="0x000000"

	info_box_style_bg_color="0xffffff"
	info_box_style_bg_alpha="1"
	info_box_style_text_color="0x000000"

	info_box_style_btn_bg_color="0xe7cd8e"
	info_box_style_btn_bg_alpha="1"
	info_box_style_btn_text_color="0x"
	
/>




<action name="kolorboxjsready_easyhtmllightbox"></action>


<!-- ********** -->
<!-- Partage Social -->
<!-- id : socialShare -->
<!-- ********** -->


<ptplugin name="socialShare" engine="kolorBox">
	<settings>
		<option name="position" value="topright" type="string" />
		<option name="margin_x" value="50" type="int" />
		<option name="margin_y" value="50" type="int" />
		<option name="external_padding" value="0" type="int" />
		<option name="animate" value="false" type="bool" />
		<option name="draggable_box" value="false" type="bool" />
		<option name="container_auto_size" value="true" type="bool" />
		<option name="container_color" value="ffffff" type="string" />
		<option name="container_alpha" value="0" type="float" />
		<option name="container_topleft_border_radius" value="0" type="int" />
		<option name="container_topright_border_radius" value="0" type="int" />
		<option name="container_bottomleft_border_radius" value="0" type="int" />
		<option name="container_bottomright_border_radius" value="0" 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="0" type="float" />
		<option name="overlay_displayed" value="false" type="bool" />
		<option name="overlay_color" value="000000" type="string" />
		<option name="overlay_alpha" value="0.50000762951094835" type="float" />

		<option name="social_btn" value="facebook#twitter#linkedin#email" type="string" />
		<option name="social_btn_icons" value="iconset4" type="string" />

		<option name="social_orientation" value="vertical" type="string" />
		<option name="social_btn_size" value="40" type="int" />
		<option name="inner_margin" value="5" type="int" />
		
		
		<option name="title_displayed" value="false" type="bool" />
		<option name="caption_displayed" value="false" type="bool" />
		<option name="close_displayed" value="false" type="bool" />
		<option name="close_position" value="topright" type="string" />
		<option name="close_text" value="socialShareclose_text" type="string" />

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

	</internaldata>
</ptplugin>

<action name="kolorBoxJsReady_socialShare">
	set(ptplugin[socialShare].jsready, true);

	inc(tour_autorotation_openatstartplugin);
	set(ptplugin[socialShare].autorotateBlocked, true);

</action>

<action name="startOpenSocialShare_socialShare">
	if(ptplugin[socialShare].jsready,
		showSocialShare_socialShare();
	,
		delayedcall(1.0,startOpenSocialShare_socialShare(););
	);
</action>


<action name="showSocialShare_socialShare">
	ifnot(ptplugin[socialShare].isOpen,
		set(ptplugin[socialShare].isOpen, true);
		pauseautorotation(forceplugin);

			js(invokePluginFunction(socialShare, loadSingleArrayItem, social));
		events.dispatch(onremovedisplayedobject);
	);
</action>

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


<action name="closeKolorBox_socialShare">
	js(invokePluginFunction(socialShare, closeKolorBox));
</action>

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

	if(ptplugin[socialShare].autorotateBlocked,if(tour_autorotation_openatstartplugin GT 0,dec(tour_autorotation_openatstartplugin);set(ptplugin[socialShare].autorotateBlocked,false);););
	set(ptplugin[socialShare].isOpen, false);
</action>

<action name="changeLanguage_socialShare">
	if(ptplugin[socialShare].jsready,
		js(invokePluginFunction(socialShare, changeLanguage));
	);
</action>

<events name="kolorBoxEvents_socialShare" 
	keep="true"
	onsharetour="showSocialShare_socialShare();" 
	onTourStart="startOpenSocialShare_socialShare();"
	
	changetourlanguage="changeLanguage_socialShare();"
	/>

  <!-- 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>


<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>

  <!-- 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>

  <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>


	<!-- WebVR plugin for VR availability tests -->

	<plugin name="ptpvrmode" devices="html5" keep="true"
		url="%FIRSTXML%/graphics/webvr.js"
		mobilevr_support="true"
		mobilevr_fake_support="true"
		vr_cursor=""
		vr_cursor_enabled="false"
		onavailable="delayedcall(1, checkVrAvailability(););"
		onunavailable="checkVrUnavailable();"
		/>
	<action name="checkVrAvailability">
		if(plugin[ptpvrmode],
			if (plugin[ptpvrmode].isavailable,
				set(tour_vrdevices, true);
				events.dispatch(onvravailable);
			,
				set(tour_vrdevices, false);
			);
		,
			checkVrUnavailable();
		);
	</action>
	<action name="checkVrUnavailable">
		set(tour_vrdevices, false);
		events.dispatch(onvrunavailable);
	</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>