<krpano version="1.0.8" onstart="startup();">
			
	<!-- vtour.xml template krpano tools version 1.0.8.12 -->	

<!-- <plugin name="options" url="../core/plugins/options.swf" keep="true" zorder="10"/> 
<plugin name="editor" url="../core/plugins/editor.swf" keep="true" zorder="10"/>
<plugin name="cursor" url="../core/plugins/cursorposition.swf" keep="true" zorder="10"/> -->

	
	<action name="startup">
		<!-- load the first scene -->
		loadscene(get(scene[1].name), null, MERGE); 
		
		<!-- build the thumbnails (remove the next line to remove the thumbnails) -->
		buildthumbs();
				<!--
			syntax: 
				create_thumbbar(numberofimages, align, orientation, x,y, width,height, border); 
				
			numberofimages ... number of images
			align          ... position of the imagebar (lefttop,left,leftright,top,center,bottom,righttop,right,bottom)
			orientation    ... orientation of the imagebar (h or v)
			x,y            ... position offsets
			width,height   ... thumbnail imagesize
			border         ... border around images
		-->
		create_thumbbar(6, right, v, 10,10, 90,60, 6);

		thumbbar_addimage('images/IMG_1683.jpg');
		thumbbar_addimage('images/IMG_1685.jpg');
		thumbbar_addimage('images/IMG_1688.jpg');
		thumbbar_addimage('images/IMG_1696.jpg');
		thumbbar_addimage('images/IMG_1702.jpg');
		thumbbar_addimage('images/IMG_1704.jpg');
	</action>
	
	
	<!-- disable the default progress bar -->
	<progress showload="none" showwait="none" />
	

	<!-- hotspot styles (for Flash and HTML5) -->
	<style name="hotspot_ani_black"
	       url="hotspots/hotspot_ani_black_64x64x20.png"
	       crop="0|0|64|64"
	       frames="20" framewidth="64" frameheight="64" frame="0"
	       onloaded="hotspot_animate();"
	       altonloaded="if(isphone, mul(scale,2)); onloaded();"
	       />

	<style name="hotspot_ani_white"
	       url="hotspots/hotspot_ani_white_64x64x20.png"
	       crop="0|0|64|64"
	       frames="20" framewidth="64" frameheight="64" frame="0"
	       onloaded="hotspot_animate();"
	       altonloaded="if(isphone, mul(scale,2)); onloaded();"
	       />	       

	<action name="hotspot_animate">
		inc(frame,1,get(frames),0);
		mul(ypos,frame,frameheight);
		txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
		delayedcall(0.03, hotspot_animate() );
	</action>	       

<plugin name="title"
 	        url="title.png"
	        keep="true"
 	        visible="true" enabled="true" handcursor="true" 
 	        zorder="5"
 	        alpha="1.00" blendmode="normal"
 	        smoothing="true"
 	        align="topcenter" edge="topcenter"
 	        onclick=""
 	        onhover=""
	        scale="1"
	        />	
			

					
	
	<scene name="scene_men" title="men" onstart="" thumburl="men.tiles/thumb.jpg">

		<view hlookat="180" vlookat="0" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" />

		<preview url="men.tiles/preview.jpg" />

		<image>
			<left  url="men.tiles/pano_l.jpg" />
			<front url="men.tiles/pano_f.jpg" />
			<right url="men.tiles/pano_r.jpg" />
			<back  url="men.tiles/pano_b.jpg" />
			<up    url="men.tiles/pano_u.jpg" />
			<down  url="men.tiles/pano_d.jpg" />
			<mobile>
				<left  url="men.tiles/mobile_l.jpg" />
				<front url="men.tiles/mobile_f.jpg" />
				<right url="men.tiles/mobile_r.jpg" />
				<back  url="men.tiles/mobile_b.jpg" />
				<up    url="men.tiles/mobile_u.jpg" />
				<down  url="men.tiles/mobile_d.jpg" />
			</mobile>
			<tablet>
				<left  url="men.tiles/tablet_l.jpg" />
				<front url="men.tiles/tablet_f.jpg" />
				<right url="men.tiles/tablet_r.jpg" />
				<back  url="men.tiles/tablet_b.jpg" />
				<up    url="men.tiles/tablet_u.jpg" />
				<down  url="men.tiles/tablet_d.jpg" />
			</tablet>
		</image>

		<hotspot name="spot1" style="hotspot_ani_black" 
		         ath="165.96627395752057" atv="-2.6057340546468346"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene(scene_wedding,null,MERGE,BLEND(1));"
		         />
				 
		<hotspot name="spot2" style="hotspot_ani_black" 
		         ath="189.1644327619706" atv="-2.5498125684175217"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene(scene_women,null,MERGE,BLEND(1));"
		         />

	</scene>


	<scene name="scene_wedding" title="wedding" onstart="" thumburl="wedding.tiles/thumb.jpg">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" />
		<lensflare name="lf0" set="DEFAULT" visible="true"  ath="98.3121" atv="-30.6592" size="0.80" blind="0.60" blindcurve="4.00" />

		<preview url="wedding.tiles/preview.jpg" />

		<image>
			<left  url="wedding.tiles/pano_l.jpg" />
			<front url="wedding.tiles/pano_f.jpg" />
			<right url="wedding.tiles/pano_r.jpg" />
			<back  url="wedding.tiles/pano_b.jpg" />
			<up    url="wedding.tiles/pano_u.jpg" />
			<down  url="wedding.tiles/pano_d.jpg" />
			<mobile>
				<left  url="wedding.tiles/mobile_l.jpg" />
				<front url="wedding.tiles/mobile_f.jpg" />
				<right url="wedding.tiles/mobile_r.jpg" />
				<back  url="wedding.tiles/mobile_b.jpg" />
				<up    url="wedding.tiles/mobile_u.jpg" />
				<down  url="wedding.tiles/mobile_d.jpg" />
			</mobile>
			<tablet>
				<left  url="wedding.tiles/tablet_l.jpg" />
				<front url="wedding.tiles/tablet_f.jpg" />
				<right url="wedding.tiles/tablet_r.jpg" />
				<back  url="wedding.tiles/tablet_b.jpg" />
				<up    url="wedding.tiles/tablet_u.jpg" />
				<down  url="wedding.tiles/tablet_d.jpg" />
			</tablet>
		</image>

		<hotspot name="spot1" style="hotspot_ani_black" 
		          ath="227.15722068300184" atv="2.5640336245006505"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene(scene_men,null,MERGE,BLEND(1));"
		         />
				 
		<hotspot name="spot2" style="hotspot_ani_white" 
		         ath="52.531344924320514" atv="8.03670320992809"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene(scene_women,null,MERGE,BLEND(1));"
		         />	
				 
		<plugin name="snow"
	        url="snow.swf"
	        blendmode="normal"
	        type="image"
	        imageurl="roseheart.png"
	        imagescale="1"
	        flakes="100"
	        color="0xFFFFFF"
	        floor="0.3"
	        speed="0.5"
	        spreading="4.0"
	        shake="4.0"
	        speedvariance="1.5"
	        rainwidth="0.5"
	        rainalpha="0.5"
	        />
			
		<plugin name="snow2"
	        url="snow.swf"
	        blendmode="normal"
	        type="image"
	        imageurl="heart.png"
	        imagescale="1"
	        flakes="100"
	        color="0xFFFFFF"
	        floor="0.3"
	        speed="0.5"
	        spreading="4.0"
	        shake="4.0"
	        speedvariance="1.5"
	        rainwidth="0.5"
	        rainalpha="0.5"
	        />						 

	</scene>


	<scene name="scene_women" title="women" onstart="" thumburl="women.tiles/thumb.jpg">

		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="90" maxpixelzoom="2.0" fovmin="60" fovmax="120" />
		<lensflare name="lf0" set="DEFAULT" visible="true"  ath="62.9407" atv="-41.8500" size="0.80" blind="0.60" blindcurve="4.00" />

		<preview url="women.tiles/preview.jpg" />

		<image>
			<left  url="women.tiles/pano_l.jpg" />
			<front url="women.tiles/pano_f.jpg" />
			<right url="women.tiles/pano_r.jpg" />
			<back  url="women.tiles/pano_b.jpg" />
			<up    url="women.tiles/pano_u.jpg" />
			<down  url="women.tiles/pano_d.jpg" />
			<mobile>
				<left  url="women.tiles/mobile_l.jpg" />
				<front url="women.tiles/mobile_f.jpg" />
				<right url="women.tiles/mobile_r.jpg" />
				<back  url="women.tiles/mobile_b.jpg" />
				<up    url="women.tiles/mobile_u.jpg" />
				<down  url="women.tiles/mobile_d.jpg" />
			</mobile>
			<tablet>
				<left  url="women.tiles/tablet_l.jpg" />
				<front url="women.tiles/tablet_f.jpg" />
				<right url="women.tiles/tablet_r.jpg" />
				<back  url="women.tiles/tablet_b.jpg" />
				<up    url="women.tiles/tablet_u.jpg" />
				<down  url="women.tiles/tablet_d.jpg" />
			</tablet>
		</image>

		<hotspot name="spot1" style="hotspot_ani_white" 
		         ath="218.79571662327155" atv="5.992136147428517"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene(scene_men,null,MERGE,BLEND(1));"
		         />
				 
		<hotspot name="spot2" style="hotspot_ani_white" 
		         ath="101.43640185837826" atv="6.069480414365226"
		         zoom="false"
		         onclick="looktohotspot(get(name)); loadscene(scene_wedding,null,MERGE,BLEND(1));"
		         />	   />


	</scene>

	<!-- thumbnail actions begin (remove the 'buildthumbs()' call in the onstart event to remove the thumbs) -->
	<action name="buildthumbs">
		if(%1 != NEXT, set(i,0));
		if(i LT scene.count,
			copy(thumb, scene[get(i)].thumburl);
			txtadd(thumbname,'thumb_',get(i));
			addplugin(get(thumbname));
			set(plugin[get(thumbname)].url, get(thumb));
			set(plugin[get(thumbname)].keep, true);
			set(plugin[get(thumbname)].align, leftbottom);
			set(plugin[get(thumbname)].width,  40);
			set(plugin[get(thumbname)].height, 40);
			set(plugin[get(thumbname)].x, 10);
			set(plugin[get(thumbname)].y, 10);
			mul(plugin[get(thumbname)].x, i,3);
			mul(plugin[get(thumbname)].y, i,3);
			add(plugin[get(thumbname)].x, 5);
			add(plugin[get(thumbname)].y, 5);
			copy(plugin[get(thumbname)].xsmall, plugin[get(thumbname)].x);
			copy(plugin[get(thumbname)].ysmall, plugin[get(thumbname)].y);
			add(plugin[get(thumbname)].zorder, 100, i);
			set(plugin[get(thumbname)].effect,glow(0xFFFFFF,1.0,2,10000));
			set(plugin[get(thumbname)].jsborder,'1px solid #FFFFFF');
			copy(plugin[get(thumbname)].thumbpos, i);
			set(plugin[get(thumbname)].linkedscene, get(scene[get(i)].name) );
			set(plugin[get(thumbname)].onclick, openthumbs() );
			inc(i);
			buildthumbs(NEXT);
		  );
	</action>

	<action name="openthumb">
		if(%2 != NEXT,
			set(pos,0);
			copy(curpos, plugin[%1].thumbpos);
			set(xdst, 0);
			set(ydst, 0);
		  );

		if(pos LT curpos,
			inc(pos);
			inc(ydst,90);
			sub(ymax, stageheight, 100);
			if(ydst GT ymax, inc(xdst,90);set(ydst,0); );
			openthumb(%1,NEXT);
		  ,
			add(xdst,10);
			add(ydst,10);
			tween(plugin[%1].x, get(xdst) );
			tween(plugin[%1].y, get(ydst) );
			tween(plugin[%1].width, 80);
			tween(plugin[%1].height, 80);
		  );
	</action>

	<action name="closethumb">
		tween(plugin[%1].x, get(plugin[%1].xsmall));
		tween(plugin[%1].y, get(plugin[%1].ysmall));
		tween(plugin[%1].width, 40);
		tween(plugin[%1].height, 40);
	</action>

	<action name="openthumbs">
		if(%1 != NEXT,
			set(i,0);
			set(events.onclick, set(events.onclick,null); delayedcall(0.1, closethumbs() ); );
		  );

		if(i LT scene.count,
			txtadd(thumbname,'thumb_',get(i));
			openthumb(get(thumbname));
			set(plugin[get(thumbname)].onclick, set(events.onclick,null); closethumbs(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); );
			inc(i);
			openthumbs(NEXT);
		  );
	</action>

	<action name="closethumbs">
		if(%1 != NEXT, set(i,0));
		if(i LT scene.count,
			txtadd(thumbname,'thumb_',get(i));
			closethumb(get(thumbname));
			set(plugin[get(thumbname)].onclick, openthumbs() );
			inc(i);
			closethumbs(NEXT);
		  );
	</action>
	<!-- thumbnail actions end -->

	<action name="create_thumbbar">
		set(thumbbar_images,      %1);
		set(thumbbar_align,       %2);
		set(thumbbar_orientation, %3);
		set(thumbbar_x,           %4);
		set(thumbbar_y,           %5);
		set(thumbbar_thumbwidth,  %6);
		set(thumbbar_thumbheight, %7);
		set(thumbbar_border,      %8);
		set(thumbbar_image_index, 0);

		set(thumbbar_xoffset, get(thumbbar_border) );
		set(thumbbar_yoffset, get(thumbbar_border) );
		set(thumbbar_xborder, 0);
		set(thumbbar_yborder, 0);

		if(thumbbar_orientation == h,
			add(thumbbar_yborder, thumbbar_y, thumbbar_thumbheight);
			add(thumbbar_yborder, thumbbar_yborder, thumbbar_border);
			add(thumbbar_yborder, thumbbar_yborder, thumbbar_border);
			add(thumbbar_yborder, thumbbar_yborder, thumbbar_border);
			mul(thumbbar_yborder, thumbbar_yborder, 2);
			mul(thumbbar_xborder, thumbbar_border, 2);
			if(%2 == left,   set(thumbbar_yoffset,0); );
			if(%2 == right,  set(thumbbar_yoffset,0); );
			if(%2 == top,    mul(thumbbar_xoffset,thumbbar_border,0.5); );
			if(%2 == bottom, mul(thumbbar_xoffset,thumbbar_border,0.5); );
			if(%2 == center, mul(thumbbar_xoffset,thumbbar_border,0.5); set(thumbbar_yoffset,0); mul(thumbbar_yborder,thumbbar_border,2); );
		  ,
			add(thumbbar_xborder, thumbbar_x, thumbbar_thumbwidth);
			add(thumbbar_xborder, thumbbar_xborder, thumbbar_border);
			add(thumbbar_xborder, thumbbar_xborder, thumbbar_border);
			add(thumbbar_xborder, thumbbar_xborder, thumbbar_border);
			mul(thumbbar_xborder, thumbbar_xborder, 2);
			mul(thumbbar_yborder, thumbbar_border, 2);
			if(%2 == left,   mul(thumbbar_yoffset,thumbbar_border,0.5); );
			if(%2 == right,  mul(thumbbar_yoffset,thumbbar_border,0.5); );
			if(%2 == top,    set(thumbbar_xoffset,0); );
			if(%2 == bottom, set(thumbbar_xoffset,0); );
			if(%2 == center, set(thumbbar_xoffset,0); mul(thumbbar_yoffset,thumbbar_border,0.5); mul(thumbbar_xborder,thumbbar_border,2); );
		  );

		addplugin(thumbbar);
		set(plugin[thumbbar].align, get(thumbbar_align));
		set(plugin[thumbbar].x, get(thumbbar_x));
		set(plugin[thumbbar].y, get(thumbbar_y));
		set(plugin[thumbbar].url, '%CURRENTXML%/white.jpg');
		set(plugin[thumbbar].alpha, 0.5);
		set(plugin[thumbbar].zorder, 1);
		set(plugin[thumbbar].enabled, false);
		set(plugin[thumbbar].keep, true);
	</action>


	<action name="thumbbar_addimage">
		txtadd(pname, 'thumbbar_image_', get(thumbbar_image_index));
		addplugin(get(pname));
		set(plugin[%pname].zorder, 2);
		set(plugin[%pname].url, %CURRENTXML%/%1);
		set(plugin[%pname].align,  get(thumbbar_align));
		set(plugin[%pname].width,  get(thumbbar_thumbwidth));
		set(plugin[%pname].height, get(thumbbar_thumbheight));
		set(plugin[%pname].keep, true);

		if (thumbbar_orientation == 'v',
			<!-- vertical thumbs -->
			add(plugin[%pname].x, thumbbar_x, thumbbar_xoffset);

			add(tmp, thumbbar_border, thumbbar_thumbheight);
			mul(tmp, tmp, thumbbar_image_index);
			add(tmp, tmp, thumbbar_yoffset);
			add(plugin[%pname].y, thumbbar_y, tmp );

			set(thumbbar_vcenter,false);
			if(thumbbar_align == left,   set(thumbbar_vcenter,true));
			if(thumbbar_align == center, set(thumbbar_vcenter,true));
			if(thumbbar_align == right,  set(thumbbar_vcenter,true));

			if(thumbbar_vcenter,
				add(tmp2, thumbbar_border, thumbbar_thumbheight);
				mul(tmp2, tmp2, thumbbar_images);
				mul(tmp2, tmp2, 0.5);
				sub(plugin[%pname].y, plugin[%pname].y, tmp2 );
				mul(tmp3, thumbbar_thumbheight, 0.5);
				add(plugin[%pname].y, plugin[%pname].y, tmp3 );
			  );

			sub(tmp, tmp, thumbbar_yoffset);
			add(tmp, tmp, thumbbar_border);
			add(tmp, tmp, thumbbar_thumbheight);
			add(tmp, tmp, thumbbar_border);
			set(plugin[thumbbar].height, get(tmp));

			mul(tmp, thumbbar_border, 2);
			add(plugin[thumbbar].width, tmp, thumbbar_thumbwidth);
		   ,

			<!-- horizontal thumbs -->
			add(plugin[%pname].y, thumbbar_y, thumbbar_yoffset);

			add(tmp, thumbbar_border, thumbbar_thumbwidth);
			mul(tmp, tmp, thumbbar_image_index);
			add(tmp, tmp, thumbbar_xoffset);
			add(plugin[%pname].x, thumbbar_x, tmp );

			set(thumbbar_hcenter,false);
			if(thumbbar_align == top,    set(thumbbar_hcenter,true));
			if(thumbbar_align == center, set(thumbbar_hcenter,true));
			if(thumbbar_align == bottom, set(thumbbar_hcenter,true));

			if(thumbbar_hcenter,
				add(tmp2, thumbbar_border, thumbbar_thumbwidth);
				mul(tmp2, tmp2, thumbbar_images);
				mul(tmp2, tmp2, 0.5);
				sub(plugin[%pname].x, plugin[%pname].x, tmp2 );
				mul(tmp3, thumbbar_thumbwidth, 0.5);
				add(plugin[%pname].x, plugin[%pname].x, tmp3 );
			  );

			sub(tmp, tmp, thumbbar_xoffset);
			add(tmp, tmp, thumbbar_border);
			add(tmp, tmp, thumbbar_thumbwidth);
			add(tmp, tmp, thumbbar_border);
			set(plugin[thumbbar].width, get(tmp));

			mul(tmp, thumbbar_border, 2);
			add(plugin[thumbbar].height, tmp, thumbbar_thumbheight);
		   );

		copy(plugin[%pname].thumbx, plugin[%pname].x);
		copy(plugin[%pname].thumby, plugin[%pname].y);

		set(plugin[%pname].onclick, thumbbar_showimage(get(name)) );

		inc(thumbbar_image_index);
	</action>


	<action name="thumbbar_showimage">
		thumbbar_hide_allimages();

		set(plugin[%1].zorder, 3);

		push(plugin[%1].width);
		push(plugin[%1].height);
		plugin[%1].resetsize();
		copy(plugin[%1].originalwidth, plugin[%1].width);
		copy(plugin[%1].originalheight, plugin[%1].height);
		pop(plugin[%1].height);
		pop(plugin[%1].width);

		set(imgwidth, get(plugin[%1].originalwidth));
		set(imgheight, get(plugin[%1].originalheight));

		set(maxwidth, get(stagewidth));
		sub(maxwidth, maxwidth, thumbbar_xborder);

		set(maxheight, get(stageheight));
		sub(maxheight, maxheight, thumbbar_yborder);

		if(imgwidth GT maxwidth,
		   mul(imgheight, imgheight, maxwidth);
		   div(imgheight, imgheight, imgwidth);
		   copy(imgwidth, maxwidth);
		  );

		if(imgheight GT maxheight,
		   mul(imgwidth, imgwidth, maxheight);
		   div(imgwidth, imgwidth, imgheight);
		   copy(imgheight, maxheight);
		  );

		tween(plugin[%1].width, get(imgwidth));
		tween(plugin[%1].height, get(imgheight));

		mul(tmp, thumbbar_border, 3);
		add(tmp, tmp, thumbbar_thumbwidth);

		plugin[%1].changeorigin(center,center);

		tween(plugin[%1].x, 0);
		tween(plugin[%1].y, 0);

		set(plugin[%1].onclick, thumbbar_hideimage(%1) );
	</action>


	<action name="thumbbar_hideimage">
		plugin[%1].changeorigin(get(thumbbar_align),get(thumbbar_align));

		set(plugin[%1].zorder, 2);

		tween(plugin[%1].width, get(thumbbar_thumbwidth));
		tween(plugin[%1].height, get(thumbbar_thumbheight));
		tween(plugin[%1].x, get(plugin[%1].thumbx));
		tween(plugin[%1].y, get(plugin[%1].thumby));

		set(plugin[%1].onclick, thumbbar_showimage(%1) );
	</action>


	<action name="thumbbar_hide_allimages">
		if(%1 != NEXT, set(i,0));
		txtadd(pname, 'thumbbar_image_', get(i));

		thumbbar_hideimage(get(pname));

		inc(i);
		if(i LT thumbbar_images, thumbbar_hide_allimages(NEXT));
	</action>



</krpano>

