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

    
  <!-- Spot Style - Stairs Up -->


  <style name="IconStairsUp"
         url="%FIRSTXML%/spots/up_user_defaultpoint0.svg"
         visible="false"
         edge="center"
         onhover="onhoverIconStairsUp"
         onover="onoverIconStairsUp"
         onout="onoutIconStairsUp"

         height="45"
         width="45"
         />
  <action name="onhoverIconStairsUp">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconStairsUp">
tween(scale, 1.2);


  </action>
  <action name="onoutIconStairsUp">
    hideTooltip();
    tween(scale, 1);


  </action>



    
  <!-- Spot Style - Video Spot -->


  <style name="IconVideoSpot"
         url="%FIRSTXML%/spots/video_user_defaultpoint1.svg"
         visible="false"
         edge="center"
         onhover="onhoverIconVideoSpot"
         onover="onoverIconVideoSpot"
         onout="onoutIconVideoSpot"

         height="45"
         width="45"
         />
  <action name="onhoverIconVideoSpot">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconVideoSpot">
tween(scale, 1.2);


  </action>
  <action name="onoutIconVideoSpot">
    hideTooltip();
    tween(scale, 1);


  </action>



    
  <!-- Spot Style - Exit Room -->


  <style name="IconExitRoom"
         url="%FIRSTXML%/spots/exit_user_defaultpoint2.svg"
         visible="false"
         edge="center"
         onhover="onhoverIconExitRoom"
         onover="onoverIconExitRoom"
         onout="onoutIconExitRoom"

         height="45"
         width="45"
         />
  <action name="onhoverIconExitRoom">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconExitRoom">
tween(scale, 1.2);


  </action>
  <action name="onoutIconExitRoom">
    hideTooltip();
    tween(scale, 1);


  </action>



    
  <!-- Spot Style - Move Here -->


  <style name="IconMoveHere"
         url="%FIRSTXML%/spots/move_user_defaultpoint3.svg"
         visible="false"
         edge="center"
         onhover="onhoverIconMoveHere"
         onover="onoverIconMoveHere"
         onout="onoutIconMoveHere"

         height="45"
         width="45"
         />
  <action name="onhoverIconMoveHere">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconMoveHere">
tween(scale, 1.2);


  </action>
  <action name="onoutIconMoveHere">
    hideTooltip();
    tween(scale, 1);


  </action>



    
  <!-- Spot Style - Stairs Down -->


  <style name="IconStairsDown"
         url="%FIRSTXML%/spots/down_user_defaultpoint4.svg"
         visible="false"
         edge="center"
         onhover="onhoverIconStairsDown"
         onover="onoverIconStairsDown"
         onout="onoutIconStairsDown"

         height="45"
         width="45"
         />
  <action name="onhoverIconStairsDown">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconStairsDown">
tween(scale, 1.2);


  </action>
  <action name="onoutIconStairsDown">
    hideTooltip();
    tween(scale, 1);


  </action>



    
  <!-- Spot Style - Enter Room -->


  <style name="IconEnterRoom"
         url="%FIRSTXML%/spots/enter_user_defaultpoint5.svg"
         visible="false"
         edge="center"
         onhover="onhoverIconEnterRoom"
         onover="onoverIconEnterRoom"
         onout="onoutIconEnterRoom"

         height="45"
         width="45"
         />
  <action name="onhoverIconEnterRoom">
    showtooltip('hotspot');
  </action>
  <action name="onoverIconEnterRoom">
tween(scale, 1.2);


  </action>
  <action name="onoutIconEnterRoom">
    hideTooltip();
    tween(scale, 1);


  </action>



  <action name="displayWebVideo">
    if(layer[webvideodisplay_bg],

    ,
      <!-- add overlay -->
      addlayer(webvideodisplay_bg);
      set(layer[webvideodisplay_bg].type, container);
      set(layer[webvideodisplay_bg].zorder, 98);
      set(layer[webvideodisplay_bg].align, topleft);
      set(layer[webvideodisplay_bg].width, 100%);
      set(layer[webvideodisplay_bg].height, 100%);
      set(layer[webvideodisplay_bg].bgcolor, %16);
      set(layer[webvideodisplay_bg].bgalpha, %17);
      set(layer[webvideodisplay_bg].bgcapture, true);
      set(layer[webvideodisplay_bg].handcursor, false);
      set(layer[webvideodisplay_bg].alpha, 0.0);
      set(layer[webvideodisplay_bg].onclick, displayWebVideoObjectClose() );
      tween(layer[webvideodisplay_bg].alpha, 1.0, 0.5, default,


        addlayer(webvideodisplay_player);
        set(layer[webvideodisplay_player].parent, layer[webvideodisplay_bg]);
        set(layer[webvideodisplay_player].align, %13);
        set(layer[webvideodisplay_player].x, %14);
        set(layer[webvideodisplay_player].y, %15);
        set(layer[webvideodisplay_player].alpha, 0.0);
        set(layer[webvideodisplay_player].pauseautorotate, %18);
        set(layer[webvideodisplay_player].pausebgsound, %19);

        sub(maxstagewidth, get(stagewidth), %14);
        sub(maxstageheight, get(stageheight), %15);

        if('4:3' == '%3',
          div(aspect, 4, 3);
        ,
          if('2.39:1' == '%3',
            div(aspect, 2.39, 1);
          ,
            div(aspect, 16, 9);
          );
        );
        if(%9,
          if(%10 == 'pixel',
            set(new_videowidth, %9);
            div(new_videoheight, get(new_videowidth), get(aspect));
          ,
            mul(new_videowidth, get(maxstagewidth), %9);
            div(new_videowidth, 100);
            div(new_videoheight, get(new_videowidth), get(aspect));
          );
        ,
          ifnot(%11,
            set(max_videoheight, %2);
            set(new_videowidth, %1);
            set(new_videoheight, %2);
          );
        );
        if(%11,
          ifnot(%9,
            if(%12 == 'pixel',
              set(new_videoheight, %11);
              mul(new_videowidth, get(new_videoheight), get(aspect));
            ,
              mul(new_videoheight, get(maxstageheight), %11);
              div(new_videoheight, 100);
              mul(new_videowidth, get(new_videoheight), get(aspect));
            );
            set(max_videoheight, get(new_videoheight));
          ,
            if(%12 == 'pixel',
              set(max_videoheight, %11);
            ,
              mul(max_videoheight, get(maxstageheight), %11);
              div(max_videoheight, 100);
            );
          );
        ,
          set(max_videoheight, get(new_videoheight));
        );
        if(new_videowidth GT maxstagewidth,
          set(new_videowidth, get(maxstagewidth));
          div(new_videoheight, get(new_videowidth), get(aspect));
        );
        if(max_videoheight GT maxstageheight,
          set(max_videoheight, get(maxstageheight));
        );
        if(new_videoheight GT max_videoheight,
          set(new_videoheight, get(max_videoheight));
          mul(new_videowidth, get(new_videoheight), get(aspect));
        );
        roundval(new_videowidth);
        roundval(new_videoheight);
        set(layer[webvideodisplay_player].width, get(new_videowidth));
        set(layer[webvideodisplay_player].height, get(new_videoheight));

        set(tour_current_played_web_video, %8);

        if(device.html5,

          txtadd(iframecode, '[iframe width="',get(layer[webvideodisplay_player].width),'" height="',get(layer[webvideodisplay_player].height),'" src="','%4','%8','?','%6','" frameborder="0" allowfullscreen][/iframe]');
          set(layer[webvideodisplay_player].html, get(iframecode));
          set(layer[webvideodisplay_player].padding, 0);
          set(layer[webvideodisplay_player].type, 'text');
          set(layer[webvideodisplay_player].onloaded, displayWebVideoObjectReady() );
        ,

          txtadd(embedurl, '%5','%8','%7');
          set(layer[webvideodisplay_player].onloaded, registercontentsize(%1,%2);displayWebVideoObjectReady(); );
          set(layer[webvideodisplay_player].url, get(embedurl));
        );
      );
    );
  </action>
  <action name="displayWebVideoObjectReady">
    if(layer[webvideodisplay_player],
      set(layer[webvideodisplay_player].currentCall, true);
      events.dispatch(onremovedisplayedobject);
      tween(layer[webvideodisplay_player].alpha, 1.0, default, default,
        if(layer[webvideodisplay_player].pauseautorotate,pauseautorotation(forcehotspot);
);
      );
    );
  </action>
  <action name="displayWebVideoObjectClose">
    if(layer[webvideodisplay_player],
      if(layer[webvideodisplay_player].currentCall,
        set(layer[webvideodisplay_player].currentCall, false);
      ,
        set(layer[webvideodisplay_bg].onclick, null);
        delete(tour_current_played_web_video);
        tween(layer[webvideodisplay_player].alpha, 0.0, 0.25, default);
        tween(layer[webvideodisplay_bg].alpha,0.0, 0.50, default,
          if(layer[webvideodisplay_player].pauseautorotate,resumeautorotation(forcehotspot);
);
          removelayer(webvideodisplay_bg);
          removelayer(webvideodisplay_player);
        );
      );
    );
  </action>
  <events name="displayWebVideoObjectEvents" keep="true" onremovedisplayedobject="displayWebVideoObjectClose();"/>

</krpano>