<?xml version="1.0" encoding="UTF-8"?>
<includes>
	<include file="Includes_GenreIcons.xml" />

	<include name="WidgetBusyAnimation">
<!-- GETS STUCK INVISIBLY RUNNING AND BECOMES CPU HOG -->
<!-- 		<control type="image" id="12345"> -->
<!-- 		<visible>Control.IsVisible($PARAM[id]) + Container($PARAM[id]).IsUpdating</visible> -->
<!-- 		<description>Busy animation</description> -->
<!-- 		<top>30</top> -->
<!-- 		<left>30</left> -->
<!-- 		<width>60</width> -->
<!-- 		<height>60</height> -->
<!-- 		<texture colordiffuse="TitleTextColor" fallback="special://skin/extras/spinners/Sun.png">$INFO[Skin.String(busyloader)]</texture> -->
<!-- 		<aspectratio>keep</aspectratio> -->
<!-- 		<animation effect="rotate" start="360" end="0" center="auto" time="3000" loop="true"  condition="!Skin.HasSetting(Disable.Animations)">conditional</animation> -->
<!-- 		</control> -->
	</include>
	<include name="WidgetContents">
		<left>$PARAM[left]</left>
		<width>$PARAM[width]</width>
		<height>780</height>
		<onup>$PARAM[onup]</onup>
		<ondown>$PARAM[ondown]</ondown>
		<onleft>$PARAM[onleft]</onleft>
		<onright>$PARAM[onright]</onright>

		<!-- work around for items which are playlist groups, which are otherwise not clickable -->
		<onclick
			condition="
  String.Contains(ListItem.FolderPath,xsp=)
+ String.StartsWith(ListItem.FolderPath,videodb) 
+ [
   String.IsEqual(ListItem.DBTYPE,tag)
   | String.IsEqual(ListItem.DBTYPE,set)
   | String.IsEqual(ListItem.DBTYPE,genre)
   | String.IsEqual(ListItem.DBTYPE,director)
   | String.IsEqual(ListItem.DBTYPE,studio)
   | String.IsEqual(ListItem.DBTYPE,actor)
   | String.IsEqual(ListItem.DBTYPE,country)
   | String.IsEqual(ListItem.DBTYPE,year)
   | String.IsEqual(ListItem.DBTYPE,artist)
   | String.IsEqual(ListItem.DBTYPE,album)
   | String.IsEqual(ListItem.DBTYPE,tvshow)
  ]
">activatewindow(videos,$INFO[ListItem.FolderPath])</onclick>

		<onclick
			condition="
  String.Contains(ListItem.FolderPath,xsp=)
+ String.StartsWith(ListItem.FolderPath,musicdb) 
+ [
   String.IsEqual(ListItem.DBTYPE,tag)
   | String.IsEqual(ListItem.DBTYPE,set)
   | String.IsEqual(ListItem.DBTYPE,genre)
   | String.IsEqual(ListItem.DBTYPE,director)
   | String.IsEqual(ListItem.DBTYPE,studio)
   | String.IsEqual(ListItem.DBTYPE,actor)
   | String.IsEqual(ListItem.DBTYPE,country)
   | String.IsEqual(ListItem.DBTYPE,year)
   | String.IsEqual(ListItem.DBTYPE,artist)
   | String.IsEqual(ListItem.DBTYPE,album)
  ]
">activatewindow(music,$INFO[ListItem.FolderPath])</onclick>

		<onback>9000</onback>
		<preloaditems>2</preloaditems>
		<viewtype label="21371">list</viewtype>
		<!-- <scrolltime tween="quadratic" easing="out">300</scrolltime> -->
		<orientation>$PARAM[orientation]</orientation>
		<visible>!IsEmpty(Container(9000).ListItem.Property(widgetPath)) + !String.IsEqual(Container(9000).ListItem.Property(widget),weather) +
			!String.IsEqual(Container(9000).ListItem.Property(widget),settings)
		</visible>

		<itemlayout height="390" width="350"
			condition="[String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[21371]) + ![String.Contains(Container(9000).ListItem.Property(widgetPath),recentlyaddedepisodes) | String.Contains(Container(9000).ListItem.Property(widgetType),episodes)]] | String.IsEmpty(Container(9000).ListItem.Property(widgetIcon))">
			<include content="ItemBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<visible>!$EXP[externalGenreIcon]</visible>
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/thumbnail.png">$VAR[WidgetArt]</texture>
			</control>
			<include content="external-genre-icon">
				<param name="left" value="20" />
				<param name="top" value="20" />
				<param name="width" value="310" />
				<param name="height" value="310" />
			</include>

			<control type="image">
				<top>20</top>
				<left>20</left>
				<right>20</right>
				<height>310</height>
				<texture border="5">overlays/diffuse-overlay.png</texture>
				<visible>Skin.HasSetting(Enable.HighlightFocused)</visible>
			</control>
			<include content="OverlayIcons">
							<param name="OverlayLeft" value="290" />
							<param name="OverlayTop" value="24" />
			</include>
		</itemlayout>

		<focusedlayout height="390" width="350"
			condition="[String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[21371]) + ![String.Contains(Container(9000).ListItem.Property(widgetPath),recentlyaddedepisodes) | String.Contains(Container(9000).ListItem.Property(widgetType),episodes)]] | String.IsEmpty(Container(9000).ListItem.Property(widgetIcon))">
			<include content="ItemFocusBorder">

			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<visible>!$EXP[externalGenreIcon]</visible>
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/thumbnail.png">$VAR[WidgetArt]</texture>
			</control>
			<include content="external-genre-icon">
				<param name="left" value="20" />
				<param name="top" value="20" />
				<param name="width" value="310" />
				<param name="height" value="310" />
			</include>
			<include content="OverlayIcons">
							<param name="OverlayLeft" value="290" />
							<param name="OverlayTop" value="24" />
			</include>
		</focusedlayout>

		<itemlayout height="260" width="350"
			condition="String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[20445]) | String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[31100]) | String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[31088]) | [String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[21371]) + [String.Contains(Container(9000).ListItem.Property(widgetPath),recentlyaddedepisodes) | String.Contains(Container(9000).ListItem.Property(widgetType),episodes)]]">
			<include content="ItemBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>197</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<visible>!String.IsEmpty(ListItem.Art(fanart))</visible>
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>180</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/fanart-widget.png">$VAR[WidgetArt]</texture>
			</control>
			<control type="image">
				<visible>String.IsEmpty(ListItem.Art(fanart))</visible>
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>180</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png">$VAR[WidgetArt]</texture>
			</control>
			<!-- <include content="external-genre-icon"> -->
			<!-- <param name="left" value="20" /> -->
			<!-- <param name="top" value="20" /> -->
			<!-- <param name="width" value="208" /> -->
			<!-- <param name="height" value="310" /> -->
			<!-- </include> -->

			<control type="image">
				<top>20</top>
				<left>20</left>
				<right>20</right>
				<height>180</height>
				<texture border="5">overlays/diffuse-overlay.png</texture>
				<visible>Skin.HasSetting(Enable.HighlightFocused)</visible>
			</control>
			<include content="OverlayIcons">
							<param name="OverlayLeft" value="290" />
							<param name="OverlayTop" value="24" />
			</include>
		</itemlayout>

		<focusedlayout height="260" width="350"
			condition="String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[20445]) | String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[31100]) | String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[31088]) | [String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[21371]) + [String.Contains(Container(9000).ListItem.Property(widgetPath),recentlyaddedepisodes) | String.Contains(Container(9000).ListItem.Property(widgetType),episodes)]]">
			<include content="ItemFocusBorder">

			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>197</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<visible>!String.IsEmpty(ListItem.Art(fanart))</visible>
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>180</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/fanart-widget.png">$VAR[WidgetArt]</texture>
			</control>
			<control type="image">
				<visible>String.IsEmpty(ListItem.Art(fanart))</visible>
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>180</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png">$VAR[WidgetArt]</texture>
			</control>
			<!-- <include content="external-genre-icon"> -->
			<!-- <param name="left" value="20" /> -->
			<!-- <param name="top" value="20" /> -->
			<!-- <param name="width" value="208" /> -->
			<!-- <param name="height" value="310" /> -->
			<!-- </include> -->
			<include content="OverlayIcons">
							<param name="OverlayLeft" value="290" />
							<param name="OverlayTop" value="24" />
			</include>
		</focusedlayout>

		<itemlayout height="390" width="700"
			condition="!Skin.HasSetting(Enable.HorizontalMenu) + String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[20021])">
			<include content="ItemBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<align>right</align>
				<label>$VAR[WidgetThumbnailLabel2]</label>
			</control>

			<control type="image">
				<visible>!$EXP[externalGenreIcon]</visible>
				<left>20</left>
				<top>20</top>
				<width>208</width>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/poster-widget.png">$VAR[WidgetArt]</texture>
			</control>

			<include content="external-genre-icon">
				<param name="left" value="20" />
				<param name="top" value="20" />
				<param name="width" value="310" />
				<param name="height" value="310" />
			</include>



			<control type="textbox">
				<left>250</left>
				<top>30</top>
				<width>415</width>
				<height>290</height>
				<font>font13_widget</font>
				<label>$VAR[VideoInfoPlotVar]</label>
			</control>
			<control type="image">
				<top>20</top>
				<left>20</left>
				<right>20</right>
				<height>310</height>
				<texture border="5">overlays/diffuse-overlay.png</texture>
				<visible>Skin.HasSetting(Enable.HighlightFocused)</visible>
			</control>
			<include content="OverlayIcons">
				<param name="OverlayLeft" value="644" />
				<param name="OverlayTop" value="18" />
			</include>
		</itemlayout>
		<focusedlayout height="390" width="700"
			condition="!Skin.HasSetting(Enable.HorizontalMenu) + String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[20021])">
			<include content="ItemFocusBorder">

			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<align>right</align>
				<label>$VAR[WidgetThumbnailLabel2]</label>
			</control>
			<control type="image">
				<visible>!$EXP[externalGenreIcon]</visible>
				<left>20</left>
				<top>20</top>
				<width>208</width>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/poster-widget.png">$VAR[WidgetArt]</texture>
			</control>


			<include content="external-genre-icon">
				<param name="left" value="20" />
				<param name="top" value="20" />
				<param name="width" value="310" />
				<param name="height" value="310" />
			</include>
			<control type="textbox">
				<left>250</left>
				<top>30</top>
				<width>415</width>
				<height>290</height>
				<font>font13_widget</font>
				<label>$VAR[VideoInfoPlotVar]</label>
				<include>AutoscrollDefault</include>
			</control>
			<include content="OverlayIcons">
				<param name="OverlayLeft" value="644" />
				<param name="OverlayTop" value="18" />
			</include>
		</focusedlayout>

		<itemlayout height="390" width="875"
			condition="Skin.HasSetting(Enable.HorizontalMenu) + String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[20021])">
			<include content="ItemBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<align>right</align>
				<label>$VAR[WidgetThumbnailLabel2]</label>
			</control>
			<control type="image">
				<visible>!$EXP[externalGenreIcon]</visible>
				<left>20</left>
				<top>20</top>
				<width>208</width>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/poster-widget.png">$VAR[WidgetArt]</texture>
			</control>
			<include content="external-genre-icon">
				<param name="left" value="20" />
				<param name="top" value="20" />
				<param name="width" value="310" />
				<param name="height" value="310" />
			</include>

			<control type="textbox">
				<left>250</left>
				<top>30</top>
				<width>590</width>
				<height>290</height>
				<font>font13_widget</font>
				<label>$VAR[VideoInfoPlotVar]</label>
			</control>
			<control type="image">
				<top>20</top>
				<left>20</left>
				<right>20</right>
				<height>310</height>
				<texture border="5">overlays/diffuse-overlay.png</texture>
				<visible>Skin.HasSetting(Enable.HighlightFocused)</visible>
			</control>
			<include content="OverlayIcons">
				<param name="OverlayLeft" value="819" />
				<param name="OverlayTop" value="18" />
			</include>
		</itemlayout>
		<focusedlayout height="390" width="875"
			condition="Skin.HasSetting(Enable.HorizontalMenu) + String.IsEqual(Container(9000).ListItem.Property(widgetIcon),$LOCALIZE[20021])">

			<include content="ItemFocusBorder">

			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<align>right</align>
				<label>$VAR[WidgetThumbnailLabel2]</label>
			</control>
			<control type="image">
				<visible>!$EXP[externalGenreIcon]</visible>
				<left>20</left>
				<top>20</top>
				<width>208</width>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">scale</aspectratio>
				<texture background="true" fallback="DefaultFolder.png" diffuse="diffuse/poster-widget.png">$VAR[WidgetArt]</texture>
			</control>
			<include content="external-genre-icon">
				<param name="left" value="20" />
				<param name="top" value="20" />
				<param name="width" value="310" />
				<param name="height" value="310" />
			</include>
			<control type="textbox">
				<left>250</left>
				<top>30</top>
				<width>590</width>
				<height>290</height>
				<font>font13_widget</font>
				<label>$VAR[VideoInfoPlotVar]</label>
				<include>AutoscrollDefault</include>
			</control>
			<include content="OverlayIcons">
				<param name="OverlayLeft" value="819" />
				<param name="OverlayTop" value="18" />
			</include>
		</focusedlayout>
	</include>

	<!-- weather widget moved to weather include -->
	<include file="MyWeather-includes-data.xml" />

	<include name="SettingsWidgetContents">
		<visible>String.IsEqual(Container(9000).ListItem.Property(widget),settings)</visible>
		<top>0</top>
		<left>$PARAM[left]</left>
		<width>$PARAM[width]</width>
		<height>780</height>
		<onleft>$PARAM[onleft]</onleft>
		<onright>$PARAM[onright]</onright>
		<onback>9000</onback>
		<onup>$PARAM[onup]</onup>
		<ondown>$PARAM[ondown]</ondown>
		<preloaditems>2</preloaditems>
		<viewtype label="21371">list</viewtype>
		<scrolltime tween="quadratic" easing="out">300</scrolltime>

		<itemlayout height="260" width="350" condition="!Skin.HasSetting(Enable.HorizontalMenu)">
			<include content="ItemBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>197</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>180</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png">$INFO[ListItem.Icon]</texture>
			</control>


			<control type="image">
				<top>20</top>
				<left>20</left>
				<right>20</right>
				<height>180</height>
				<texture border="5">overlays/diffuse-overlay.png</texture>
				<visible>Skin.HasSetting(Enable.HighlightFocused)</visible>
			</control>
		</itemlayout>

		<focusedlayout height="260" width="350" condition="!Skin.HasSetting(Enable.HorizontalMenu)">
			<include content="ItemFocusBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>197</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>180</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png">$INFO[ListItem.Icon]</texture>
			</control>
		</focusedlayout>

		<itemlayout height="390" width="350" condition="Skin.HasSetting(Enable.HorizontalMenu)">
			<include content="ItemBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png">$INFO[ListItem.Icon]</texture>
			</control>

			<control type="image">
				<top>20</top>
				<left>20</left>
				<right>20</right>
				<height>310</height>
				<texture border="5">overlays/diffuse-overlay.png</texture>
				<visible>Skin.HasSetting(Enable.HighlightFocused)</visible>
			</control>
		</itemlayout>

		<focusedlayout height="390" width="350" condition="Skin.HasSetting(Enable.HorizontalMenu)">
			<include content="ItemFocusBorder">
			</include>
			<control type="label">
				<left>20</left>
				<right>20</right>
				<top>327</top>
				<height>50</height>
				<label>$VAR[WidgetThumbnailLabel]</label>
			</control>
			<control type="image">
				<left>20</left>
				<top>20</top>
				<right>20</right>
				<height>310</height>
				<aspectratio scalediffuse="false" align="center" aligny="center">keep</aspectratio>
				<texture background="true" fallback="DefaultFolder.png">$INFO[ListItem.Icon]</texture>
			</control>
		</focusedlayout>
		<include>SettingsListContents</include>
	</include>
</includes>