Index: extensions/Shadogo/trunk/admin/images/index.php
===================================================================
--- extensions/Shadogo/trunk/admin/images/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/admin/images/index.php	(revision 10016)
@@ -0,0 +1,28 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/admin/index.php
===================================================================
--- extensions/Shadogo/trunk/admin/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/admin/index.php	(revision 10016)
@@ -0,0 +1,28 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/admin/shadogo_admin.php
===================================================================
--- extensions/Shadogo/trunk/admin/shadogo_admin.php	(revision 10016)
+++ extensions/Shadogo/trunk/admin/shadogo_admin.php	(revision 10016)
@@ -0,0 +1,85 @@
+<?php
+/*
+Plugin : Shadogo
+Plugin URI: http://binaryworld.hd.free.fr/
+*/
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+load_language('plugin.lang', SHADOGO_PATH);
+
+
+$plugin = get_plugin_data($plugin_id);
+
+if (!empty($_POST['save']))
+{
+	// Modal overlay libraries
+	$c = $plugin->getConfig();
+	$c->set('modalOverlayLib', $_POST['modalOverlayLib']);
+	$c->set('modalOverlayTheme', $_POST['modalOverlayTheme']);
+	
+	// Overlay configuration
+	$c->set('favoritePicture', isset( $_POST['favoritePicture'] ));
+	$c->set('hdPicture', isset( $_POST['hdPicture'] ));
+	$c->set('downloadPicture', isset( $_POST['downloadPicture'] ));
+	$c->set('addToBasket', isset( $_POST['addToBasket'] ));
+	
+	// Mediaplayer configuration
+	$plugin->getConfig()->set('mediaFilePattern', stripslashes( $_POST['mediaFilePattern'] ));
+	$c->set('displayMediaPlayer', isset( $_POST['displayMediaPlayer'] ));
+	
+	// HD configuration
+	$c->set('hdPictureInOverlay', isset( $_POST['hdPictureInOverlay'] ));
+	$c->set('hdPicturePrefilterPattern', stripslashes( $_POST['hdPicturePrefilterPattern'] ));
+	$c->set('hdPicturePrefilterReplacement', stripslashes( $_POST['hdPicturePrefilterReplacement'] ));
+	
+	// Slideshow configuration
+	$c->set('slideshowInOverlay', isset($_POST['slideshowInOverlay']));
+	$c->set('slideshowPrefilterPattern', stripslashes( $_POST['slideshowPrefilterPattern'] ));
+	$c->set('slideshowPrefilterReplacement', stripslashes( $_POST['slideshowPrefilterReplacement'] ));
+	
+	// Thumbnail configuration
+	$c->set('thumbInOverlay', isset($_POST['thumbInOverlay'] ));
+	$c->set('thumbMediaPlayerIcon', isset($_POST['thumbMediaPlayerIcon'] ));
+	$c->set('thumbContentLabel', isset($_POST['thumbContentLabel'] ));
+	$c->set('thumbContentIcon', isset($_POST['thumbContentIcon'] ));
+	$c->set('thumbContentPageInOverlay', isset($_POST['thumbContentPageInOverlay'] ));
+	$c->set('thumbButtonsTemplateSearch', stripslashes( $_POST['thumbButtonsTemplateSearch'] ));
+	$c->set('thumbHrefContentSearch', stripslashes( $_POST['thumbHrefContentSearch'] ));
+	
+	$c->commit();
+	unset($_POST['save']);
+}
+ 
+global $template;
+$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/template/shadogo_admin.tpl') );
+
+$config = (!empty($_POST['restore'])) ? $plugin->getDefaultConfig() : $plugin->getConfig();
+
+$libs = $plugin->getInstalledOverlayLibs();
+$themes = array();
+foreach ($libs as $lib) {
+	$themes[$lib] = array();
+	foreach ($plugin->getOverlayLib($lib)->getThemes() as $value) {
+		$themes[$lib][$value] = $value;
+	};
+}
+
+$template_vars = array (
+	'modalOverlayLibs' => $libs,
+	'modalOverlayLibsSelected' => $config->get('modalOverlayLib'),
+	'modalOverlayThemes' => $themes,
+	'modalOverlayThemesSelected' => array(
+		$config->get('modalOverlayLib') => $config->get('modalOverlayTheme')
+	),
+	'U_SHADOGO' => $plugin->getPluginURL()
+);
+
+$template->assign($template_vars);
+$config->assign($template); 
+
+unset($_POST['restore']);
+unset($_POST['cancel']);
+
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
+
+
+?>
Index: extensions/Shadogo/trunk/admin/template/index.php
===================================================================
--- extensions/Shadogo/trunk/admin/template/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/admin/template/index.php	(revision 10016)
@@ -0,0 +1,28 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/admin/template/shadogo_admin.tpl
===================================================================
--- extensions/Shadogo/trunk/admin/template/shadogo_admin.tpl	(revision 10016)
+++ extensions/Shadogo/trunk/admin/template/shadogo_admin.tpl	(revision 10016)
@@ -0,0 +1,188 @@
+<div class="titrePage">
+  <h2>Shadogo Admin</h2>
+</div>
+
+
+<form name="piwishadow_mainform" method="post" action="{$SHADOGO_F_ACTION}" class="general">
+
+<div style="padding-left:1em; margin:2em 0">
+{html_options name=modalOverlayLib values=$modalOverlayLibs output=$modalOverlayLibs selected=$modalOverlayLibsSelected}
+<label style="margin-left:1em">
+	{'shadogo_overlaylibs'|@translate}
+</label>
+</div>
+
+<div style="padding-left:1em; margin:2em 0">
+{html_options name=modalOverlayTheme options=$modalOverlayThemes selected=$modalOverlayThemesSelected}
+<label style="margin-left:1em">
+	{'shadogo_overlaythemes'|@translate}
+</label>
+</div>
+
+<div style="padding-left:1em; margin:2em 0">
+<script type="text/javascript">
+{literal} 
+$(document).ready(function() {
+	$('.expert-param').hide();
+});
+{/literal} 
+</script>
+<input type="checkbox" onclick="if (this.checked) $('.expert-param').show(); else $('.expert-param').hide();"/>
+<label style="margin-left:1em">
+	{'shadogo_display_expert_params'|@translate}
+</label>
+</div>
+
+<HR>
+
+<fieldset style="background: transparent url('{$U_SHADOGO}/admin/images/overlay_bottom.jpg') no-repeat scroll 99% center;">
+	<legend>{'shadogo_overlay_config'|@translate}</legend>
+	<ol style="padding: 1em 1em 0 1em; list-style: none">
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_overlay_hdpicture'|@translate}
+		</label>
+		<input type="checkbox" name="hdPicture" value="{$shadogo.hdPicture}" {if $shadogo.hdPicture } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_overlay_download'|@translate}
+		</label>
+		<input type="checkbox" name="downloadPicture" value="{$shadogo.downloadPicture}" {if $shadogo.downloadPicture } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_overlay_addtobasket'|@translate}
+		</label>
+		<input type="checkbox" name="addToBasket" value="{$shadogo.addToBasket}" {if $shadogo.addToBasket } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_overlay_favorites'|@translate}
+		</label>
+		<input type="checkbox" name="favoritePicture" value="{$shadogo.favoritePicture}" {if $shadogo.favoritePicture } CHECKED  {/if} />
+	</li>
+	</ol>  
+</fieldset>
+
+<fieldset>
+	<legend>{'shadogo_mediaplayer_config'|@translate}</legend>
+	<ol style="padding: 1em 1em 0 1em; list-style: none">  
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_mediaplayer_content'|@translate}
+		</label>
+		<input type="checkbox" name="displayMediaPlayer" value="{$shadogo.displayMediaPlayer}" {if $shadogo.displayMediaPlayer } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_mediafile_pattern'|@translate}
+		</label>
+		<input type="text" name="mediaFilePattern" value='{$shadogo.mediaFilePattern}' size="80" />
+	</li>
+	</ol>  
+</fieldset>
+
+<fieldset>
+	<legend>{'shadogo_hdcontent_config'|@translate}</legend>
+	<ol style="padding: 1em 1em 0 1em; list-style: none">  
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_hdcontent_inoverlay'|@translate}
+		</label>
+		<input type="checkbox" name="hdPictureInOverlay" value="{$shadogo.hdPictureInOverlay}" {if $shadogo.hdPictureInOverlay } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_hdcontent_pattern'|@translate}
+		</label>
+		<input type="text" name="hdPicturePrefilterPattern" value='{$shadogo.hdPicturePrefilterPattern}' size="80" />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_hdcontent_replacement'|@translate}
+		</label>
+		<input type="text" name="hdPicturePrefilterReplacement" value='{$shadogo.hdPicturePrefilterReplacement}' size="80" />
+	</li>
+	</ol>  
+</fieldset>
+
+<fieldset>
+	<legend>{'shadogo_slideshow_config'|@translate}</legend>
+	<ol style="padding: 1em 1em 0 1em; list-style: none">  
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_slideshow_inoverlay'|@translate}
+		</label>
+		<input type="checkbox" name="slideshowInOverlay" value="{$shadogo.slideshowInOverlay}" {if $shadogo.slideshowInOverlay } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_slideshow_pattern'|@translate}
+		</label>
+		<input type="text" name="slideshowPrefilterPattern" value='{$shadogo.slideshowPrefilterPattern}' size="80" />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_slideshow_replacement'|@translate}
+		</label>
+		<input type="text" name="slideshowPrefilterReplacement" value='{$shadogo.slideshowPrefilterReplacement}' size="80" />
+	</li>
+	</ol>  
+</fieldset>
+
+<fieldset>
+	<legend>{'shadogo_thumbnail_config'|@translate}</legend>
+	<ol style="padding: 1em 1em 0 1em; list-style: none">  
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_content_inoverlay'|@translate}
+		</label>
+		<input type="checkbox" name="thumbInOverlay" value="{$shadogo.thumbInOverlay}" {if $shadogo.thumbInOverlay } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_player_icon'|@translate}
+		</label>
+		<input type="checkbox" name="thumbMediaPlayerIcon" value="{$shadogo.thumbMediaPlayerIcon}" {if $shadogo.thumbMediaPlayerIcon } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_content_icon'|@translate}
+		</label>
+		<input type="checkbox" name="thumbContentIcon" value="{$shadogo.displayContentIcon}" {if $shadogo.thumbContentIcon } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_label'|@translate}
+		</label>
+		<input type="checkbox" name="thumbContentLabel" value="{$shadogo.thumbContentLabel}" {if $shadogo.thumbContentLabel } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_contentpage_inoverlay'|@translate}
+		</label>
+		<input type="checkbox" name="thumbContentInOverlay" value="{$shadogo.thumbContentInOverlay}" {if $shadogo.thumbContentInOverlay } CHECKED  {/if} />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_buttons_search'|@translate}
+		</label>
+		<input type="text" name="thumbButtonsTemplateSearch" value='{$shadogo.thumbButtonsTemplateSearch}' size="80" />
+	</li>
+	<li style="float:left; clear:left; width:100%; padding-bottom:1em;" class="expert-param">
+		<label style="float:left; width:25em; margin-right:1em">
+			{'shadogo_thumbnail_hrefcontent_search'|@translate}
+		</label>
+		<input type="text" name="thumbHrefContentSearch" value='{$shadogo.thumbHrefContentSearch}' size="80" />
+	</li>
+	</ol>
+</fieldset>
+
+<fieldset style="float:none; width:auto; border:0 none #FFF">
+<input type="submit" value="{'shadogo_save'|@translate}" name="save" />
+<input type="submit" value="{'shadogo_cancel'|@translate}" name="cancel" />
+<input type="submit" value="{'shadogo_restore'|@translate}" name="restore" />
+</fieldset>
+<span id="piwigo_info_register">{'shadogo_note_warm_restore'|@translate}</span>
+</form>
Index: extensions/Shadogo/trunk/config.inc.php
===================================================================
--- extensions/Shadogo/trunk/config.inc.php	(revision 10016)
+++ extensions/Shadogo/trunk/config.inc.php	(revision 10016)
@@ -0,0 +1,111 @@
+<?php
+/*
+Plugin Name: Shadogo
+Author: Binaryworld
+Author URI: http://binaryworld.hd.free.fr/
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+
+class ShadogoConfig { 
+	public static $CONFIG_NAME = 'shadogo';
+	
+	private $_config = null;
+	
+	function  __construct($config = null) {
+		global $conf;
+		if ($config == null) {
+			if (isset($conf[self::$CONFIG_NAME]))
+				$this->_config = unserialize($conf[self::$CONFIG_NAME]);
+		} else {
+			$this->_config = $config; 
+		}
+	}
+	
+	public static function createDefaultConfiguration () {
+		$config = array(
+		//
+		// global parameters
+		//
+		'mediaFilePattern' => '/^(?<path>.*)\\/(?<file>[^\\/]*)_-_(?<media>flv|mp4|swf|mp3)(?:_(?<width>\\d+)x(?<height>\\d+))?/i',
+		//
+		// overlaylib parameters
+		//
+		'modalOverlayLib'	=> 'mediaboxAdvanced',
+		'modalOverlayTheme' => 'grey',
+		'favoritePicture' 	=> true,
+		'hdPicture' 		=> true,
+		'downloadPicture' 	=> true,
+		'addToBasket'	 	=> true,
+		//
+		// content parameters
+		//
+		// Display the HD picture in shadowbox when the picture is clicked in the picture content page
+		'hdPictureInOverlay'		 	=> true,	
+		'hdPicturePrefilterPattern' 	=> '/href="javascript:phpWGOpenWindow.*"/i',	
+		'hdPicturePrefilterReplacement' => 'href="{$high.U_HIGH}" rel="lightbox"',	
+		// Display media player in the piwigo default content page
+		'displayMediaPlayer' 			=> true,
+		//
+		// sideshow
+		//
+		'slideshowInOverlay'		 		=> true,
+		'slideshowPrefilterPattern' 		=> '/(href="\\{\\$(?:U_SLIDESHOW|U_SLIDESHOW_START)\\}")([^>]*)(rel=".*")?/i',
+		'slideshowPrefilterReplacement' 	=> '$1 rel="lightbox[diaporama 80% 80%]"$2',
+		'slideshowClosePattern' 			=> '/href="\\{\\$U_SLIDESHOW_STOP\\}"([^>]*)/i',	
+		'slideshowCloseReplacement'			=> 'href="#" onclick="parent.window.ShadogoOverlayWnd.close(); return false;"$1',
+		//
+		// Thumbnail
+		'thumbInOverlay'		 		=> true,
+		'thumbMediaPlayerIcon' 			=> true,
+		'thumbContentIcon'				=> true,
+		'thumbContentLabel'				=> false,	
+		'thumbContentInOverlay'			=> false,
+		'thumbButtonsTemplateSearch'	=> '{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}',	
+		'thumbHrefContentSearch'		=> 'href="{$thumbnail.URL}"'	
+		);
+		return $config;
+	}
+	
+	public static function install() {
+		global $conf;
+		$c = self::createDefaultConfiguration();
+	
+		if (!isset($conf[self::$CONFIG_NAME])) {
+			$query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'. self::$CONFIG_NAME .'" , "'.pwg_db_real_escape_string(serialize($c)).'" , "Shadogo configuration");';
+			pwg_query($query);
+		}
+	}
+	public static function uninstall() {
+		// Clean DB
+		$q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="'. self::$CONFIG_NAME .'" LIMIT 1;';
+		pwg_query($q);
+		// Clean global config
+		if (isset($conf[self::$CONFIG_NAME]))
+			unset($conf[self::$CONFIG_NAME]);
+	}
+	
+	
+	public function &__get($name) {
+		return $this->_config[$name];
+	}
+	public function get($name) {
+		return $this->_config[$name];
+	}
+	
+	function &__set($name, $val) {
+		$this->_config[$name] = $val;
+	}
+	public function set($name, $value) {
+		$this->_config[$name] = $value;
+	}
+	
+	public function commit() {
+		conf_update_param(self::$CONFIG_NAME, pwg_db_real_escape_string(serialize($this->_config)));
+	}
+	
+	public function assign(&$template) {
+		$template->assign(self::$CONFIG_NAME, $this->_config);
+	}
+}
Index: extensions/Shadogo/trunk/images/index.php
===================================================================
--- extensions/Shadogo/trunk/images/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/images/index.php	(revision 10016)
@@ -0,0 +1,28 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/index.php
===================================================================
--- extensions/Shadogo/trunk/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/language/en_UK/description.txt
===================================================================
--- extensions/Shadogo/trunk/language/en_UK/description.txt	(revision 10016)
+++ extensions/Shadogo/trunk/language/en_UK/description.txt	(revision 10016)
@@ -0,0 +1,1 @@
+Display pictures, videos and piwigo pages in modal overlay.
Index: extensions/Shadogo/trunk/language/en_UK/index.php
===================================================================
--- extensions/Shadogo/trunk/language/en_UK/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/language/en_UK/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/language/en_UK/plugin.lang.php
===================================================================
--- extensions/Shadogo/trunk/language/en_UK/plugin.lang.php	(revision 10016)
+++ extensions/Shadogo/trunk/language/en_UK/plugin.lang.php	(revision 10016)
@@ -0,0 +1,72 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | shadogo - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+//
+// Piwishado Administration Form
+//
+$lang['shadogo_overlaylibs']			= 'Select the modal overlay library';
+$lang['shadogo_overlaythemes']			= 'Theme of the overlay window';
+$lang['shadogo_display_expert_params']	= 'Display expert parameters';
+
+$lang['shadogo_overlay_config']			= 'Overlay window configuration';
+$lang['shadogo_overlay_hdpicture']		= 'Enable the display of the HD picture';
+$lang['shadogo_overlay_download']		= 'Enable the download of the HD picture';
+$lang['shadogo_overlay_addtobasket']	= 'Enable the basket management';
+$lang['shadogo_overlay_favorites']		= 'Enable favorites maangement';
+
+$lang['shadogo_mediaplayer_config']		= 'Mediaplayer configuration';
+$lang['shadogo_mediaplayer_content']	= 'Display the player in the content page';
+$lang['shadogo_mediafile_pattern']		= 'Media file pattern';
+
+$lang['shadogo_hdcontent_config']		= 'HD content configuration';
+$lang['shadogo_hdcontent_inoverlay']	= 'Display the HD content in overlay window';
+$lang['shadogo_hdcontent_pattern']		= 'HD content pattern';
+$lang['shadogo_hdcontent_replacement']	= 'HD code replacement';
+
+$lang['shadogo_slideshow_config']		= 'Slideshow configuration';
+$lang['shadogo_slideshow_inoverlay']	= 'Display the slideshow in overlay window';
+$lang['shadogo_slideshow_pattern']		= 'Slideshow pattern';
+$lang['shadogo_slideshow_replacement']	= 'Slideshow code replacement';
+
+$lang['shadogo_thumbnail_config']					= 'Thumbnail configuration';
+$lang['shadogo_thumbnail_content_inoverlay']		= 'Display the thumbnail content in overlay window';
+$lang['shadogo_thumbnail_player_icon']				= 'Display the player icon in the legend';
+$lang['shadogo_thumbnail_content_icon']				= 'Display the content icon in the legend';
+$lang['shadogo_thumbnail_contentpage_inoverlay']	= 'Display the content page in overlay window';
+$lang['shadogo_thumbnail_label']					= 'Display the thumbnail label';
+$lang['shadogo_thumbnail_buttons_search']			= 'Template code to replace with thumbnail_shadogo_buttons.tpl file content';
+$lang['shadogo_thumbnail_hrefcontent_search']		= 'Template code to replace with thumbnail_shadogo_content.tpl file content';
+
+
+$lang['shadogo_save'] 					= 'Save';
+$lang['shadogo_cancel'] 				= 'Cancel';
+$lang['shadogo_restore'] 				= 'Restore the default values';
+
+$lang['shadogo_note_warm_restore'] 		= 'Please, do no forgot to save the restored configuration.';
+
+//
+// ALT
+//
+$lang['shadogo_content'] 				= 'See content';
+$lang['shadogo_play'] 					= 'Play';
+
+?>
Index: extensions/Shadogo/trunk/language/fr_FR/description.txt
===================================================================
--- extensions/Shadogo/trunk/language/fr_FR/description.txt	(revision 10016)
+++ extensions/Shadogo/trunk/language/fr_FR/description.txt	(revision 10016)
@@ -0,0 +1,2 @@
+Hébergez et partagez vos photos et vos vidéos avec Piwigo.
+Afficher dans piwigo vos photos, le diaporama et vos vidéos dans des fenêtres dynamiques et transparentes.
Index: extensions/Shadogo/trunk/language/fr_FR/index.php
===================================================================
--- extensions/Shadogo/trunk/language/fr_FR/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/language/fr_FR/index.php	(revision 10016)
@@ -0,0 +1,28 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/Shadogo/trunk/language/fr_FR/plugin.lang.php	(revision 10016)
+++ extensions/Shadogo/trunk/language/fr_FR/plugin.lang.php	(revision 10016)
@@ -0,0 +1,72 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software); you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY); without even the implied warranty of           |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program); if not, write to the Free Software          |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+//
+// Piwishado Administration Form
+//
+$lang['shadogo_overlaylibs']			= 'Librairie utilisée pour les fenêtres superposées';
+$lang['shadogo_overlaythemes']			= 'Thème actif pour les fenêtres transparentes superposées';
+$lang['shadogo_display_expert_params']	= 'Afficher les paramètres avancés';
+
+$lang['shadogo_overlay_config']			= 'Configuration des fenêtres superposées';
+$lang['shadogo_overlay_hdpicture']		= 'Activer la visualisation des photos HD';
+$lang['shadogo_overlay_download']		= 'Activer le téléchargement des photos HD';
+$lang['shadogo_overlay_addtobasket']	= 'Activer l\'ajoute du contenu au panier';
+$lang['shadogo_overlay_favorites']		= 'Activer la gestion des favories';
+
+$lang['shadogo_mediaplayer_config']		= 'Configuration du lecteur multimédia';
+$lang['shadogo_mediaplayer_content']	= 'Afficher le lecteur multimédia dans le contenu';
+$lang['shadogo_mediafile_pattern']		= 'Patron pour les fichiers multimédias';
+
+$lang['shadogo_hdcontent_config']		= 'Configuration du contenu HD';
+$lang['shadogo_hdcontent_inoverlay']	= 'Afficher le contenu HD dans une fenêtre superposée';
+$lang['shadogo_hdcontent_pattern']		= 'Patron pour le contenu HD';
+$lang['shadogo_hdcontent_replacement']	= 'Code de remplacement pour le contenu HD';
+
+$lang['shadogo_slideshow_config']		= 'Configuration du diaporama';
+$lang['shadogo_slideshow_inoverlay']	= 'Afficher le diaporama dans une fenêtre superposée';
+$lang['shadogo_slideshow_pattern']		= 'Patron pour le diaporama';
+$lang['shadogo_slideshow_replacement']	= 'Code de remplacement pour le diaporama';
+
+$lang['shadogo_thumbnail_config']					= 'Configuration des vignettes';
+$lang['shadogo_thumbnail_content_inoverlay']		= 'Afficher le contenu de la vignette dans une fenêtre superposée';
+$lang['shadogo_thumbnail_player_icon']				= 'Afficher l\'icône du lecteur dans la légende';
+$lang['shadogo_thumbnail_content_icon']				= 'Afficher l\'icône de contenu dans la légende';
+$lang['shadogo_thumbnail_contentpage_inoverlay']	= 'Afficher la page du contenu dans une fenêtre superposée';
+$lang['shadogo_thumbnail_label']					= 'Afficher le label de la vignette';
+$lang['shadogo_thumbnail_buttons_search']			= 'Code du template à remplacer par le contenu du fichier thumbnail_shadogo_buttons.tpl';
+$lang['shadogo_thumbnail_hrefcontent_search']		= 'Code du template à remplacer par le contenu du fichier thumbnail_shadogo_content.tpl';
+
+$lang['shadogo_save'] 					= 'Enregistrer';
+$lang['shadogo_cancel'] 				= 'Abandoner';
+$lang['shadogo_restore'] 				= 'Restaurer les valeurs par défaut';
+
+$lang['shadogo_note_warm_restore'] 		= 'Note: Pensez à enregistrer la configuration après une restauration.';
+
+//
+// ALT
+//
+$lang['shadogo_content'] 				= 'Voir le contenu...';
+$lang['shadogo_play'] 					= 'Lecture';
+
+
+?>
Index: extensions/Shadogo/trunk/language/index.php
===================================================================
--- extensions/Shadogo/trunk/language/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/language/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery                |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/Quickie.js
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/Quickie.js	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/Quickie.js	(revision 10016)
@@ -0,0 +1,151 @@
+/*
+---
+description: MooTools wrapper to embed QuickTime movies.
+
+license: MIT-style
+
+authors:
+- Jose Prado
+
+requires:
+  core/1.2.4: [Browser, Class.Extras, Array, Hash, Element, Element.Event]
+
+provides:
+  Quickie
+  Browser.Plugins.QuickTime
+
+...
+*/
+(function() {
+	var qtEvents = ['begin', 'loadedmetadata', 'loadedfirstframe', 'canplay', 'canplaythrough',
+	'durationchange', 'load', 'ended', 'error', 'pause', 'play', 'progress', 'waiting', 'stalled',
+	'timechanged', 'volumechange'];
+	
+	Quickie = new Class({
+			
+		Implements: [Options, Events],
+		version: '2.1',
+		options: {/*
+			onPlay: $empty,
+			onStop: $empty,*/
+			id: null,
+			height: 1,
+			width: 1,
+			container: null,
+			attributes: {
+				controller: "true",
+				postdomevents: "true"
+			}
+		},
+		
+		initialize: function(path, options){
+			this.setOptions(options);
+			options = this.options;
+			this.id = this.options.id || 'Quickie_' + $time();
+			this.path = path;
+			var container = options.container;
+			
+			// Extra attributes
+			options.attributes = $H(options.attributes);
+			options.attributes.src = path;
+			
+			// Get Browser appropriate HTML code
+			this.html = this.toHTML();
+			
+			if (Browser.Engine.trident) {
+				document.getElementById(container).innerHTML = this.html;
+				this.quickie = document.getElementById(this.id);
+				this.ieFix.delay(10, this);
+			} else {
+				var wrapper = document.createElement('div');
+				wrapper.innerHTML = this.html;
+				this.quickie = wrapper.firstChild;
+				this.transferEvents();
+				document.id(container).empty();
+				document.getElementById(container).appendChild(this.quickie);
+			}
+		},
+		
+		toHTML: function() {
+			if (!this.html) {
+				var attributes = this.options.attributes,
+				    height     = (attributes.controller == "true") ? this.options.height + 16 : this.options.height,
+				    width      = this.options.width,
+				    element    = '';
+					  
+				if (Browser.Engine.trident) {					
+					element = '<object id="'+this.id+'" ';
+					element += 'width="'+width+'" ';
+					element += 'height="'+height+'" ';
+					element += 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
+					element += 'style="behavior:url(#qt_event_source);" ';
+					element += 'codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
+					
+					attributes.each(function(value, key) {
+						element += '<param name="'+key+'" value="'+value+'" />';
+					});
+					
+					element += '</object>';
+				} else {
+					element = '<embed id="'+this.id+'" ';
+					element += 'width="'+width+'" ';
+					element += 'height="'+height+'" ';
+					element += 'pluginspage="http://www.apple.com/quicktime/download/" ';
+					
+					attributes.each(function(value, key) {
+						element += key+'="'+value+'" ';
+					});
+					
+					element += '/>';
+				}
+				this.html = element;
+			}
+			return this.html;
+		},
+		
+		ieFix: function() {
+			document.getElementById(this.id).SetResetPropertiesOnReload(false);
+			document.getElementById(this.id).SetURL(this.path);
+			this.transferEvents.delay(10, this);
+		},
+		
+		transferEvents: function() {
+			var element = this.quickie;
+			
+			qtEvents.each(function(evType) {
+				addQTEvent(element, evType, this.fireEvent.pass(evType, this));
+			}.bind(this));
+		}
+		
+	});
+
+	function addQTEvent(el, evType, fn, useCapture) {
+		evType = 'qt_' + evType;
+		if (el.addEventListener) {
+			el.addEventListener(evType, fn, useCapture);
+			return true;
+		} else if (el.attachEvent) {
+			var r = el.attachEvent('on' + evType, fn);
+			return r;
+		} else {
+			el[evType] = fn;
+		}
+	}
+
+})();
+
+Browser.Plugins.QuickTime = (function(){
+	if (navigator.plugins) {
+		for (var i = 0, l = navigator.plugins.length; i < l; i++) {
+			if (navigator.plugins[i].name.indexOf('QuickTime') >= 0) {
+				return true;
+			}
+		}
+	} else {
+		try { var test = new ActiveXObject('QuickTime.QuickTime'); }
+		catch(e) {}
+		
+		if (test) { return true; }
+	}
+	return false;
+})();
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/mediaboxAdv-1.3.4b.js
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/mediaboxAdv-1.3.4b.js	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/mediaboxAdv-1.3.4b.js	(revision 10016)
@@ -0,0 +1,1128 @@
+/*
+	mediaboxAdvanced v1.3.4b - The ultimate extension of Slimbox and Mediabox; an all-media script
+	updated 2010.09.21
+		(c) 2007-2010 John Einselen <http://iaian7.com>
+	based on Slimbox v1.64 - The ultimate lightweight Lightbox clone
+		(c) 2007-2008 Christophe Beyls <http://www.digitalia.be>
+	MIT-style license.
+*/
+
+// [VB] Get script directory path
+var scriptPath = (function() 
+{
+	// Get script source
+    var scripts = document.getElementsByTagName('script'), 
+    	script = scripts[scripts.length - 1]; 
+    //No need to perform the same test we do for the Fully Qualified
+    script = script.getAttribute('src', 2); //this works in all browser even in FF/Chrome/Safari
+    //return directory path only
+    return script.substr(0,script.lastIndexOf("/")+1);
+}()); 
+
+var Mediabox;
+
+(function() {
+	// Global variables, accessible to Mediabox only
+	var options, images, activeImage, prevImage, nextImage, top, mTop, left, mLeft, winWidth, winHeight, fx, preload, preloadPrev = new Image(), preloadNext = new Image(), foxfix = false, iefix = false,
+	// DOM elements
+	overlay, center, image, bottom, captionSplit, title, caption, prevLink, number, nextLink,
+	// Mediabox specific vars
+	URL, WH, WHL, elrel, mediaWidth, mediaHeight, mediaType = "none", mediaSplit, mediaId = "mediaBox", mediaFmt, margin;
+
+	/*	Initialization	*/
+
+	window.addEvent("domready", function() {
+		// Create and append the Mediabox HTML code at the bottom of the document
+		document.id(document.body).adopt(
+			$$([
+				overlay = new Element("div", {id: "mbOverlay"}).addEvent("click", close),
+				center = new Element("div", {id: "mbCenter"})
+			]).setStyle("display", "none")
+		);
+
+		image = new Element("div", {id: "mbImage"}).injectInside(center);
+		bottom = new Element("div", {id: "mbBottom"}).injectInside(center).adopt(
+			closeLink = new Element("a", {id: "mbCloseLink", href: "#"}).addEvent("click", close),
+			nextLink = new Element("a", {id: "mbNextLink", href: "#"}).addEvent("click", next),
+			prevLink = new Element("a", {id: "mbPrevLink", href: "#"}).addEvent("click", previous),
+			//[VB]
+			hdLink = new Element("a", {id: "mbHdLink", href: "#"}).addEvent("click", hd),
+			downloadLink = new Element("a", {id: "mbDownloadLink", href: "#"}).addEvent("click", download),
+			favoriteLink = new Element("a", {id: "mbFavoriteLink", href: "#"}).addEvent("click", addToFavorites),
+			basketLink = new Element("a", {id: "mbBasketLink", href: "#"}).addEvent("click", addToBasket),
+			//
+			title = new Element("div", {id: "mbTitle"}),
+			number = new Element("div", {id: "mbNumber"}),
+			caption = new Element("div", {id: "mbCaption"})
+		);
+
+		fx = {
+			overlay: new Fx.Tween(overlay, {property: "opacity", duration: 360}).set(0),
+			image: new Fx.Tween(image, {property: "opacity", duration: 360, onComplete: captionAnimate}),
+			bottom: new Fx.Tween(bottom, {property: "opacity", duration: 240}).set(0)
+		};
+	});
+
+	/*	API		*/
+
+	Mediabox = {
+		close: function(){
+			close();	// Thanks to Yosha on the google group for fixing the close function API!
+		},
+
+		open: function(_images, startImage, _options) {
+			options = $extend({
+				// Set "previous", "next", "close", "HD", "donwload", "basket", "addFavorite", "removeFavorite" button content 
+				//(HTML code should be written as entity codes or properly escaped)
+				//[VB]
+				text: ['<big>&laquo;</big>','<big>&raquo;</big>','<big>&times;</big>','<big>&#8249;&#164;&#8250;</big>','<big>&#8226;</big>','<big>&#35;</big>','<big>&#43;</big>','<big>&#8211;</big>'],
+				loop: false,					// Allows to navigate between first and last images
+				keyboard: true,					// Enables keyboard control; escape key, left arrow, and right arrow
+				alpha: true,					// Adds 'x', 'c', 'p', and 'n' when keyboard control is also set to true
+				stopKey: false,					// Stops all default keyboard actions while overlay is open (such as up/down arrows)
+													// Does not apply to iFrame content, does not affect mouse scrolling
+				overlayOpacity: 0.7,			// 1 is opaque, 0 is completely transparent (change the color in the CSS file)
+				resizeOpening: true,			// Determines if box opens small and grows (true) or starts at larger size (false)
+				resizeDuration: 240,			// Duration of each of the box resize animations (in milliseconds)
+				resizeTransition: false,		// Mootools transition effect (false leaves it at the default)
+				initialWidth: 320,				// Initial width of the box (in pixels)
+				initialHeight: 180,				// Initial height of the box (in pixels)
+				defaultWidth: 640,				// Default width of the box (in pixels) for undefined media (MP4, FLV, etc.)
+				defaultHeight: 480,				// Default height of the box (in pixels) for undefined media (MP4, FLV, etc.)
+				showCaption: true,				// Display the title and caption, true / false
+				showCounter: true,				// If true, a counter will only be shown if there is more than 1 image to display
+				counterText: '({x} of {y})',	// Translate or change as you wish
+//			Image options
+				imgBackground: false,		// Embed images as CSS background (true) or <img> tag (false)
+											// CSS background is naturally non-clickable, preventing downloads
+											// IMG tag allows automatic scaling for smaller screens
+											// (all images have no-click code applied, albeit not Opera compatible. To remove, comment lines 212 and 822)
+				imgPadding: 100,			// Clearance necessary for images larger than the window size (only used when imgBackground is false)
+											// Change this number only if the CSS style is significantly divergent from the original, and requires different sizes
+//			Inline options
+//				overflow: 'auto',			// If set, overides CSS settings for inline content only
+//			Global media options
+				html5: 'true',				// HTML5 settings for YouTube and Vimeo, false = off, true = on
+				scriptaccess: 'true',		// Allow script access to flash files
+				fullscreen: 'true',			// Use fullscreen
+				fullscreenNum: '1',			// 1 = true
+				autoplay: 'true',			// Plays the video as soon as it's opened
+				autoplayNum: '1',			// 1 = true
+				autoplayYes: 'yes',			// yes = true
+				volume: '100',				// 0-100, used for NonverBlaster and Quicktime players
+				medialoop: 'true',			// Loop video playback, true / false, used for NonverBlaster and Quicktime players
+				bgcolor: '#000000',			// Background color, used for flash and QT media
+				wmode: 'opaque',			// Background setting for Adobe Flash ('opaque' and 'transparent' are most common)
+//			NonverBlaster
+				useNB: true,				// use NonverBlaster (true) or JW Media Player (false) for .flv and .mp4 files
+				playerpath: scriptPath +'NonverBlaster.swf',	// Path to NonverBlaster.swf
+				controlColor: '0xFFFFFF',	// set the controlbar color
+				controlBackColor: '0x000000',	// set the controlbar color
+				showTimecode: 'false',		// turn timecode display off or on
+//			JW Media Player settings and options
+				JWplayerpath: scriptPath +'player.swf',	// Path to the mediaplayer.swf or flvplayer.swf file
+				backcolor:	'000000',		// Base color for the controller, color name / hex value (0x000000)
+				frontcolor: '999999',		// Text and button color for the controller, color name / hex value (0x000000)
+				lightcolor: '000000',		// Rollover color for the controller, color name / hex value (0x000000)
+				screencolor: '000000',		// Rollover color for the controller, color name / hex value (0x000000)
+				controlbar: 'over',			// bottom, over, none (this setting is ignored when playing audio files)
+//			Quicktime options
+				controller: 'true',			// Show controller, true / false
+//			Flickr options
+				flInfo: 'true',				// Show title and info at video start
+//			Revver options
+				revverID: '187866',			// Revver affiliate ID, required for ad revinue sharing
+				revverFullscreen: 'true',	// Fullscreen option
+				revverBack: '000000',		// Background color
+				revverFront: 'ffffff',		// Foreground color
+				revverGrad: '000000',		// Gradation color
+//			Ustream options
+				usViewers: 'true',				// Show online viewer count (true/false)
+//			Youtube options
+				ytBorder: '0',				// Outline				(1=true, 0=false)
+				ytColor1: '000000',			// Outline color
+				ytColor2: '333333',			// Base interface color (highlight colors stay consistent)
+				ytQuality: '&ap=%2526fmt%3D18', // Leave empty for standard quality, use '&ap=%2526fmt%3D18' for high quality, and '&ap=%2526fmt%3D22' for HD (note that not all videos are availible in high quality, and very few in HD)
+				ytRel: '0',					// Show related videos	(1=true, 0=false)
+				ytInfo: '1',				// Show video info		(1=true, 0=false)
+				ytSearch: '0',				// Show search field	(1=true, 0=false)
+//			Viddyou options
+				vuPlayer: 'basic',			// Use 'full' or 'basic' players
+//			Vimeo options
+				vmTitle: '1',				// Show video title
+				vmByline: '1',				// Show byline
+				vmPortrait: '1',			// Show author portrait
+				vmColor: 'ffffff'			// Custom controller colors, hex value minus the # sign, defult is 5ca0b5
+			}, _options || {});
+
+			prevLink.set('html', options.text[0]);
+			nextLink.set('html', options.text[1]);
+			closeLink.set('html', options.text[2]);
+			//[VB] hdLink initialization
+			hdLink.set('html', options.text[3]);
+			hdLink.style.display = "none";
+			hdLink.title = 'HD';
+			hdLink.className = 'sd-link';
+			downloadLink.set('html', options.text[4]);
+			downloadLink.style.display = "none";
+			basketLink.set('html', options.text[5]);
+			basketLink.style.display = "none";
+			favoriteLink.style.display = "none";
+			favoriteLink.set('html', (_images[startImage][3]["fav"] == 0) ? options.text[6] : options.text[7]);			
+			//
+
+			margin = center.getStyle('padding-left').toInt()+image.getStyle('margin-left').toInt()+image.getStyle('padding-left').toInt();
+
+			if ((Browser.Engine.gecko) && (Browser.Engine.version<19)) {	// Fixes Firefox 2 and Camino 1.6 incompatibility with opacity + flash
+				foxfix = true;
+				options.overlayOpacity = 1;
+				overlay.className = 'mbOverlayFF';
+			}
+
+			if ((Browser.Engine.trident) && (Browser.Engine.version<5)) {	// Fixes IE 6 and earlier incompatibilities with CSS position: fixed;
+				iefix = true;
+				overlay.className = 'mbOverlayIE';
+				overlay.setStyle("position", "absolute");
+				position();
+			}
+
+			if (typeof _images == "string") {	// Used for single images only, with URL and Title as first two arguments
+				_images = [[_images,startImage,_options]];
+				startImage = 0;
+			}
+
+			images = _images;
+			options.loop = options.loop && (images.length > 1);
+
+			size();
+			setup(true);
+			top = window.getScrollTop() + (window.getHeight()/2);
+			left = window.getScrollLeft() + (window.getWidth()/2);
+			fx.resize = new Fx.Morph(center, $extend({duration: options.resizeDuration, onComplete: imageAnimate}, options.resizeTransition ? {transition: options.resizeTransition} : {}));
+			center.setStyles({top: top, left: left, width: options.initialWidth, height: options.initialHeight, marginTop: -(options.initialHeight/2)-margin, marginLeft: -(options.initialWidth/2)-margin, display: ""});
+			fx.overlay.start(options.overlayOpacity);
+			return changeImage(startImage);
+		}
+	};
+
+	Element.implement({
+		mediabox: function(_options, linkMapper) {
+			$$(this).mediabox(_options, linkMapper);	// The processing of a single element is similar to the processing of a collection with a single element
+
+			return this;
+		}
+	});
+
+	Elements.implement({
+		/*
+			options:	Optional options object, see Mediabox.open()
+			linkMapper:	Optional function taking a link DOM element and an index as arguments and returning an array containing 3 elements:
+						the image URL and the image caption (may contain HTML)
+			linksFilter:Optional function taking a link DOM element and an index as arguments and returning true if the element is part of
+						the image collection that will be shown on click, false if not. "this" refers to the element that was clicked.
+						This function must always return true when the DOM element argument is "this".
+		*/
+		mediabox: function(_options, linkMapper, linksFilter) {
+			// add the support of custome parameter in the a.rel
+			linkMapper = linkMapper || function(el) {
+				// [VB] get the params in the a.rel attribut
+				elrel = el.rel.split(';');
+				mediaboxRel = elrel[0];
+				elrel.shift(); // remove the first element
+				params = Array();
+				for ( var i = 0; i < elrel.length; i++) {
+					keyValue = elrel[i].split('=');
+					params[keyValue[0].trim()] = (keyValue.lenght == 1) ? true : keyValue[1].trim();
+				}
+				// parse: lightbox[gallery_name width height]
+				elrel = mediaboxRel.split(/[\[\]]/);
+				elrel = elrel[1];
+				// [VB] add optional params at the end of the array
+				return [el.href, el.title, elrel, params];
+			};
+
+			linksFilter = linksFilter || function() {
+				return true;
+			};
+
+			var links = this;
+
+			links.addEvent('contextmenu', function(e){
+				if (this.toString().match(/\.gif|\.jpg|\.jpeg|\.png/i)) e.stop();
+			});
+
+			links.removeEvents("click").addEvent("click", function() {
+				// Build the list of images that will be displayed
+				var filteredArray = links.filter(linksFilter, this);
+				var filteredLinks = [];
+				var filteredHrefs = [];
+
+				filteredArray.each(function(item, index){
+					if(filteredHrefs.indexOf(item.toString()) < 0) {
+						filteredLinks.include(filteredArray[index]);
+						filteredHrefs.include(filteredArray[index].toString());
+					};
+				});
+
+				return Mediabox.open(filteredLinks.map(linkMapper), filteredHrefs.indexOf(this.toString()), _options);
+			});
+
+			return links;
+		}
+	});
+
+	/*	Internal functions	*/
+
+	function position() {
+		overlay.setStyles({top: window.getScrollTop(), left: window.getScrollLeft()});
+	}
+
+	function size() {
+		winWidth = window.getWidth();
+		winHeight = window.getHeight();
+		overlay.setStyles({width: winWidth, height: winHeight});
+	}
+
+	function setup(open) {
+		// Hides on-page objects and embeds while the overlay is open, nessesary to counteract Firefox stupidity
+		if (Browser.Engine.gecko) {
+			["object", window.ie ? "select" : "embed"].forEach(function(tag) {
+				Array.forEach(document.getElementsByTagName(tag), function(el) {
+					if (open) el._mediabox = el.style.visibility;
+					el.style.visibility = open ? "hidden" : el._mediabox;
+				});
+			});
+		}
+
+		overlay.style.display = open ? "" : "none";
+
+		var fn = open ? "addEvent" : "removeEvent";
+		if (iefix) window[fn]("scroll", position);
+		window[fn]("resize", size);
+		if (options.keyboard) document[fn]("keydown", keyDown);
+	}
+
+	function keyDown(event) {
+		if (options.alpha) {
+			switch(event.code) {
+				case 27:	// Esc
+				case 88:	// 'x'
+				case 67:	// 'c'
+					close();
+					break;
+				case 37:	// Left arrow
+				case 80:	// 'p'
+					previous();
+					break;
+				case 39:	// Right arrow
+				case 78:	// 'n'
+					next();
+					break
+				case 96:	// [VB] 0 (NUM LOCK) 
+				case 66:	// 'b'	
+					addToBasket();
+					break;
+				case 106:	// [VB] * (NUM LOCK)
+				case 68:	// 'd'	
+					download();
+					break;
+				case 107:	// [VB] + (NUM LOCK)
+				case 70:	// 'f'	
+					addToFavorites();
+					break;
+			}
+		} else {
+			switch(event.code) {
+				case 27:	// Esc
+					close();
+					break;
+				case 37:	// Left arrow
+					previous();
+					break;
+				case 39:	// Right arrow
+					next();
+					break
+				case 96:	// [VB] + (NUM LOCK)
+					addToBasket();
+					break;
+				case 106:	// [VB] * (NUM LOCK)
+					download();
+					break;
+				case 107:	// [VB] + (NUM LOCK)
+					addToFavorites();
+					break;
+			}
+		}
+		if (options.stopKey) { return false; };
+	}
+
+	function previous() {
+		return changeImage(prevImage);
+	}
+
+	function next() {
+		return changeImage(nextImage);
+	}
+	
+	// [VB]
+	function hd() {
+		var hdURL = images[activeImage][3]["hdurl"];
+		if (hdURL && hdURL.length > 0) {
+			image.set('html', '');
+			stop();
+			center.className = "mbLoading";
+			
+			// is HD ?
+			if (hdLink.className == 'hd-link') {
+				URL = images[activeImage][0];
+				hdLink.set('html', options.text[3]);
+				hdLink.title = 'HD';
+				hdLink.className = 'sd-link';
+			} else {
+				URL = hdURL;
+				hdLink.set('html', '<big>&#164;</big>');
+				hdLink.title = 'SD';
+				hdLink.className = 'hd-link';
+			}
+			URL = encodeURI(URL).replace("(","%28").replace(")","%29");
+			
+			captionSplit = images[activeImage][1].split('::');
+			mediaType = 'img';
+			preload = new Image();
+			preload.onload = startEffect;
+			preload.src = URL;
+		}
+	}
+	function download() {
+		// displayed only if HD picture available
+		window.location.href = 'action.php?id='+ images[activeImage][3]["id"] +'&part=h';
+		return true;
+	}
+	function addToBasket() {
+		var rootUrl = options.piwigoRootUrl;
+		var cat = options.piwigoCategory;
+		var id = images[activeImage][3]["id"];
+		images[activeImage][3]["href"] = 'picture.php?/'+ id +'/category/'+ cat +'&action=add_to_caddie';
+
+		// From addToCadie function in the picture.tpl file
+		
+		if (basketLink.className.contains('disabled-link'))
+			return false;
+		basketLink.className = 'disabled-link';
+
+		var y = new PwgWS(rootUrl);
+		y.callService(
+			"pwg.caddie.add", {image_id: id} ,
+			{
+				onFailure: function(num, text) { alert(num + " " + text); document.location=images[activeImage][3]["href"];},
+				onSuccess: function(result) {basketLink.className = '';}
+			}
+		);
+		
+		return false;
+	}
+	function addToFavorites() {
+		var iid = images[activeImage][3]["id"];
+		var cid = options.piwigoCategory;
+		var href = 'picture.php?/'+ iid +'/category/'+ cid;
+
+		if (favoriteLink.className.contains('disabled-link')) 
+			return false;
+		favoriteLink.className = 'disabled-link';
+		
+		href += (images[activeImage][3]["fav"] == 0) ? '&action=add_to_favorites' : '&action=remove_from_favorites';
+
+		var favRequest = new Request({
+		    url: href,
+		    onSuccess: function(responseText, responseXML) {
+		    	var fav = (images[activeImage][3]["fav"] == 0) ? 1 : 0;
+		    	images[activeImage][3]["fav"] = fav;
+		    	favoriteLink.className = '';
+		    	favoriteLink.set('html', options.text[6 + fav]);
+		    },
+			onFailure: function(xhr) {
+				image.setStyles({backgroundImage: "none", display: ""});
+				image.set('html', '<div id="mbError">'+ xhr.responseText +'</div>');
+			},
+			onException: function(headerName, value) {
+				alert('Exception: '+ headerName +' - '+ value);
+			}
+		}).send();
+		return false;
+	}
+	//
+
+	
+	function changeImage(imageIndex) {
+		if (imageIndex >= 0) {
+			image.set('html', '');
+			activeImage = imageIndex;
+			prevImage = ((activeImage || !options.loop) ? activeImage : images.length) - 1;
+			nextImage = activeImage + 1;
+			if (nextImage == images.length) nextImage = options.loop ? 0 : -1;
+			stop();
+			center.className = "mbLoading";
+
+	/*	mediaboxAdvanced link formatting and media support	*/
+
+			if (!images[imageIndex][2]) images[imageIndex][2] = '';	// Thanks to Leo Feyer for offering this fix
+			WH = images[imageIndex][2].split(' ');
+			WHL = WH.length;
+			if (WHL>1) {
+				mediaWidth = (WH[WHL-2].match("%")) ? (window.getWidth()*((WH[WHL-2].replace("%", ""))*0.01))+"px" : WH[WHL-2]+"px";
+				mediaHeight = (WH[WHL-1].match("%")) ? (window.getHeight()*((WH[WHL-1].replace("%", ""))*0.01))+"px" : WH[WHL-1]+"px";
+			} else {
+				mediaWidth = "";
+				mediaHeight = "";
+			}
+			URL = images[imageIndex][0];
+			URL = encodeURI(URL).replace("(","%28").replace(")","%29");
+			captionSplit = images[activeImage][1].split('::');
+
+// Quietube and yFrog support
+			if (URL.match(/quietube\.com/i)) {
+				mediaSplit = URL.split('v.php/');
+				URL = mediaSplit[1];
+			} else if (URL.match(/\/\/yfrog/i)) {
+				mediaType = (URL.substring(URL.length-1));
+				if (mediaType.match(/b|g|j|p|t/i)) mediaType = 'image';
+				if (mediaType == 's') mediaType = 'flash';
+				if (mediaType.match(/f|z/i)) mediaType = 'video';
+				URL = URL+":iphone";
+			}
+			
+			// [VB]
+			hdLink.style.display = "none";
+			downloadLink.style.display = "none";
+			favoriteLink.style.display = "none";
+			basketLink.style.display = (options.displayAddToBasket) ? "inline" : "none";
+			//
+			
+	/*	Specific Media Types	*/
+
+// GIF, JPG, PNG
+			if (URL.match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i) || mediaType == 'image') {
+				// [VB]
+				hdLink.style.display = (options.displayHdPicture && images[imageIndex][3]["hdurl"]) ? "inline" : "none";
+				downloadLink.style.display = (options.displayDownload && images[imageIndex][3]["hdurl"]) ? "inline" : "none";
+				favoriteLink.style.display = (options.displayFavorite && images[imageIndex][3]["fav"]) ? "inline" : "none";
+				favoriteLink.set('html', (images[imageIndex][3]["fav"] == 0) ? options.text[6] : options.text[7]);
+				//
+					
+				mediaType = 'img';
+				URL = URL.replace(/twitpic\.com/i, "twitpic.com/show/full");
+				preload = new Image();
+				preload.onload = startEffect;
+				preload.src = URL;
+// FLV, MP4
+			} else if (URL.match(/\.flv|\.mp4/i) || mediaType == 'video') {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || options.defaultWidth;
+				mediaHeight = mediaHeight || options.defaultHeight;
+				if (options.useNB) {
+				preload = new Swiff(''+options.playerpath+'?mediaURL='+URL+'&allowSmoothing=true&autoPlay='+options.autoplay+'&buffer=6&showTimecode='+options.showTimecode+'&loop='+options.medialoop+'&controlColor='+options.controlColor+'&controlBackColor='+options.controlBackColor+'&defaultVolume='+options.volume+'&scaleIfFullScreen=true&showScalingButton=true&crop=false', {
+					id: 'MediaboxSWF',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				} else {
+				preload = new Swiff(''+options.JWplayerpath+'?file='+URL+'&backcolor='+options.backcolor+'&frontcolor='+options.frontcolor+'&lightcolor='+options.lightcolor+'&screencolor='+options.screencolor+'&autostart='+options.autoplay+'&controlbar='+options.controlbar, {
+					id: 'MediaboxSWF',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				}
+				startEffect();
+// MP3, AAC
+			} else if (URL.match(/\.mp3|\.aac|tweetmic\.com|tmic\.fm/i) || mediaType == 'audio') {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || options.defaultWidth;
+				mediaHeight = mediaHeight || "20px";
+				if (URL.match(/tweetmic\.com|tmic\.fm/i)) {
+					URL = URL.split('/');
+					URL[4] = URL[4] || URL[3];
+					URL = "http://media4.fjarnet.net/tweet/tweetmicapp-"+URL[4]+'.mp3';
+				}
+				if (options.useNB) {
+				preload = new Swiff(''+options.playerpath+'?mediaURL='+URL+'&allowSmoothing=true&autoPlay='+options.autoplay+'&buffer=6&showTimecode='+options.showTimecode+'&loop='+options.medialoop+'&controlColor='+options.controlColor+'&controlBackColor='+options.controlBackColor+'&defaultVolume='+options.volume+'&scaleIfFullScreen=true&showScalingButton=true&crop=false', {
+					id: 'MediaboxSWF',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				} else {
+				preload = new Swiff(''+options.JWplayerpath+'?file='+URL+'&backcolor='+options.backcolor+'&frontcolor='+options.frontcolor+'&lightcolor='+options.lightcolor+'&screencolor='+options.screencolor+'&autostart='+options.autoplay, {
+					id: 'MediaboxSWF',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				}
+				startEffect();
+// SWF
+			} else if (URL.match(/\.swf/i) || mediaType == 'flash') {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || options.defaultWidth;
+				mediaHeight = mediaHeight || options.defaultHeight;
+				preload = new Swiff(URL, {
+					id: 'MediaboxSWF',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// MOV, M4V, M4A, MP4, AIFF, etc.
+			} else if (URL.match(/\.mov|\.m4v|\.m4a|\.aiff|\.avi|\.caf|\.dv|\.mid|\.m3u|\.mp3|\.mp2|\.mp4|\.qtz/i) || mediaType == 'qt') {
+				mediaType = 'qt';
+				mediaWidth = mediaWidth || options.defaultWidth;
+				mediaHeight = (parseInt(mediaHeight)+16)+"px" || options.defaultHeight;
+				preload = new Quickie(URL, {
+					id: 'MediaboxQT',
+					width: mediaWidth,
+					height: mediaHeight,
+					container: 'mbImage',
+					attributes: {controller: options.controller, autoplay: options.autoplay, volume: options.volume, loop: options.medialoop, bgcolor: options.bgcolor}
+					});
+				startEffect();
+
+	/*	Social Media Sites	*/
+
+// Blip.tv
+			} else if (URL.match(/blip\.tv/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "640px";
+				mediaHeight = mediaHeight || "390px";
+				preload = new Swiff(URL, {
+					src: URL,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Break.com
+			} else if (URL.match(/break\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "464px";
+				mediaHeight = mediaHeight || "376px";
+				mediaId = URL.match(/\d{6}/g);
+				preload = new Swiff('http://embed.break.com/'+mediaId, {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// DailyMotion
+			} else if (URL.match(/dailymotion\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "480px";
+				mediaHeight = mediaHeight || "381px";
+				preload = new Swiff(URL, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Facebook
+			} else if (URL.match(/facebook\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "320px";
+				mediaHeight = mediaHeight || "240px";
+				mediaSplit = URL.split('v=');
+				mediaSplit = mediaSplit[1].split('&');
+				mediaId = mediaSplit[0];
+				preload = new Swiff('http://www.facebook.com/v/'+mediaId, {
+					movie: 'http://www.facebook.com/v/'+mediaId,
+					classid: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Flickr
+			} else if (URL.match(/flickr\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "500px";
+				mediaHeight = mediaHeight || "375px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[5];
+				preload = new Swiff('http://www.flickr.com/apps/video/stewart.swf', {
+					id: mediaId,
+					classid: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {flashvars: 'photo_id='+mediaId+'&amp;show_info_box='+options.flInfo, wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// GameTrailers Video
+			} else if (URL.match(/gametrailers\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "480px";
+				mediaHeight = mediaHeight || "392px";
+				mediaId = URL.match(/\d{5}/g);
+				preload = new Swiff('http://www.gametrailers.com/remote_wrap.php?mid='+mediaId, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Google Video
+			} else if (URL.match(/google\.com\/videoplay/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "400px";
+				mediaHeight = mediaHeight || "326px";
+				mediaSplit = URL.split('=');
+				mediaId = mediaSplit[1];
+				preload = new Swiff('http://video.google.com/googleplayer.swf?docId='+mediaId+'&autoplay='+options.autoplayNum, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Megavideo - Thanks to Robert Jandreu for suggesting this code!
+			} else if (URL.match(/megavideo\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "640px";
+				mediaHeight = mediaHeight || "360px";
+				mediaSplit = URL.split('=');
+				mediaId = mediaSplit[1];
+				preload = new Swiff('http://wwwstatic.megavideo.com/mv_player.swf?v='+mediaId, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Metacafe
+			} else if (URL.match(/metacafe\.com\/watch/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "400px";
+				mediaHeight = mediaHeight || "345px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[4];
+				preload = new Swiff('http://www.metacafe.com/fplayer/'+mediaId+'/.swf?playerVars=autoPlay='+options.autoplayYes, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Myspace
+			} else if (URL.match(/vids\.myspace\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "425px";
+				mediaHeight = mediaHeight || "360px";
+				preload = new Swiff(URL, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Revver
+			} else if (URL.match(/revver\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "480px";
+				mediaHeight = mediaHeight || "392px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[4];
+				preload = new Swiff('http://flash.revver.com/player/1.0/player.swf?mediaId='+mediaId+'&affiliateId='+options.revverID+'&allowFullScreen='+options.revverFullscreen+'&autoStart='+options.autoplay+'&backColor=#'+options.revverBack+'&frontColor=#'+options.revverFront+'&gradColor=#'+options.revverGrad+'&shareUrl=revver', {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Rutube
+			} else if (URL.match(/rutube\.ru/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "470px";
+				mediaHeight = mediaHeight || "353px";
+				mediaSplit = URL.split('=');
+				mediaId = mediaSplit[1];
+				preload = new Swiff('http://video.rutube.ru/'+mediaId, {
+					movie: 'http://video.rutube.ru/'+mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Seesmic
+			} else if (URL.match(/seesmic\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "435px";
+				mediaHeight = mediaHeight || "355px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[5];
+				preload = new Swiff('http://seesmic.com/Standalone.swf?video='+mediaId, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Tudou
+			} else if (URL.match(/tudou\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "400px";
+				mediaHeight = mediaHeight || "340px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[5];
+				preload = new Swiff('http://www.tudou.com/v/'+mediaId, {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Twitvcam
+			} else if (URL.match(/twitcam\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "320px";
+				mediaHeight = mediaHeight || "265px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[3];
+				preload = new Swiff('http://static.livestream.com/chromelessPlayer/wrappers/TwitcamPlayer.swf?hash='+mediaId, {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Twiturm
+			} else if (URL.match(/twiturm\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "402px";
+				mediaHeight = mediaHeight || "48px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[3];
+				preload = new Swiff('http://twiturm.com/flash/twiturm_mp3.swf?playerID=0&sf='+mediaId, {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Twitvid
+			} else if (URL.match(/twitvid\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "600px";
+				mediaHeight = mediaHeight || "338px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[3];
+				preload = new Swiff('http://www.twitvid.com/player/'+mediaId, {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Ustream.tv
+			} else if (URL.match(/ustream\.tv/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "400px";
+				mediaHeight = mediaHeight || "326px";
+				preload = new Swiff(URL+'&amp;viewcount='+options.usViewers+'&amp;autoplay='+options.autoplay, {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// YouKu
+			} else if (URL.match(/youku\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "480px";
+				mediaHeight = mediaHeight || "400px";
+				mediaSplit = URL.split('id_');
+				mediaId = mediaSplit[1];
+				preload = new Swiff('http://player.youku.com/player.php/sid/'+mediaId+'=/v.swf', {
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// YouTube Video (now includes HTML5 option)
+			} else if (URL.match(/youtube\.com\/watch/i)) {
+				mediaSplit = URL.split('v=');
+				if (options.html5) {
+					mediaType = 'url';
+					mediaWidth = mediaWidth || "640px";
+					mediaHeight = mediaHeight || "385px";
+					mediaId = "mediaId_"+new Date().getTime();	// Safari may not update iframe content with a static id.
+					preload = new Element('iframe', {
+						'src': 'http://www.youtube.com/embed/'+mediaSplit[1],
+						'id': mediaId,
+						'width': mediaWidth,
+						'height': mediaHeight,
+						'frameborder': 0
+						});
+					startEffect();
+				} else {
+					mediaType = 'obj';
+					mediaId = mediaSplit[1];
+					if (mediaId.match(/fmt=22/i)) {
+						mediaFmt = '&ap=%2526fmt%3D22';
+						mediaWidth = mediaWidth || "640px";
+						mediaHeight = mediaHeight || "385px";
+					} else if (mediaId.match(/fmt=18/i)) {
+						mediaFmt = '&ap=%2526fmt%3D18';
+						mediaWidth = mediaWidth || "560px";
+						mediaHeight = mediaHeight || "345px";
+					} else {
+						mediaFmt = options.ytQuality;
+						mediaWidth = mediaWidth || "480px";
+						mediaHeight = mediaHeight || "295px";
+					}
+					preload = new Swiff('http://www.youtube.com/v/'+mediaId+'&autoplay='+options.autoplayNum+'&fs='+options.fullscreenNum+mediaFmt+'&border='+options.ytBorder+'&color1=0x'+options.ytColor1+'&color2=0x'+options.ytColor2+'&rel='+options.ytRel+'&showinfo='+options.ytInfo+'&showsearch='+options.ytSearch, {
+						id: mediaId,
+						width: mediaWidth,
+						height: mediaHeight,
+						params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+						});
+					startEffect();
+				}
+// YouTube Playlist
+			} else if (URL.match(/youtube\.com\/view/i)) {
+				mediaType = 'obj';
+				mediaSplit = URL.split('p=');
+				mediaId = mediaSplit[1];
+				mediaWidth = mediaWidth || "480px";
+				mediaHeight = mediaHeight || "385px";
+				preload = new Swiff('http://www.youtube.com/p/'+mediaId+'&autoplay='+options.autoplayNum+'&fs='+options.fullscreenNum+mediaFmt+'&border='+options.ytBorder+'&color1=0x'+options.ytColor1+'&color2=0x'+options.ytColor2+'&rel='+options.ytRel+'&showinfo='+options.ytInfo+'&showsearch='+options.ytSearch, {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Veoh
+			} else if (URL.match(/veoh\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "410px";
+				mediaHeight = mediaHeight || "341px";
+				URL = URL.replace('%3D','/');
+				mediaSplit = URL.split('watch/');
+				mediaId = mediaSplit[1];
+				preload = new Swiff('http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.5.2.1001&permalinkId='+mediaId+'&player=videodetailsembedded&videoAutoPlay='+options.AutoplayNum+'&id=anonymous', {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Viddler
+			} else if (URL.match(/viddler\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "437px";
+				mediaHeight = mediaHeight || "370px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[4];
+				preload = new Swiff(URL, {
+					id: 'viddler_'+mediaId,
+					movie: URL,
+					classid: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen, id: 'viddler_'+mediaId, movie: URL}
+					});
+				startEffect();
+// Viddyou
+			} else if (URL.match(/viddyou\.com/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "416px";
+				mediaHeight = mediaHeight || "312px";
+				mediaSplit = URL.split('=');
+				mediaId = mediaSplit[1];
+				preload = new Swiff('http://www.viddyou.com/get/v2_'+options.vuPlayer+'/'+mediaId+'.swf', {
+					id: mediaId,
+					movie: 'http://www.viddyou.com/get/v2_'+options.vuPlayer+'/'+mediaId+'.swf',
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+// Vimeo (now includes HTML5 option)
+			} else if (URL.match(/vimeo\.com/i)) {
+				mediaWidth = mediaWidth || "640px";		// site defualt: 400px
+				mediaHeight = mediaHeight || "360px";	// site defualt: 225px
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[3];
+
+				if (options.html5) {
+					mediaType = 'url';
+					mediaId = "mediaId_"+new Date().getTime();	// Safari may not update iframe content with a static id.
+					preload = new Element('iframe', {
+						'src': 'http://player.vimeo.com/video/'+mediaSplit[3]+'?portrait='+options.vmPortrait,
+						'id': mediaId,
+						'width': mediaWidth,
+						'height': mediaHeight,
+						'frameborder': 0
+						});
+					startEffect();
+				} else {
+					mediaType = 'obj';
+					preload = new Swiff('http://www.vimeo.com/moogaloop.swf?clip_id='+mediaId+'&amp;server=www.vimeo.com&amp;fullscreen='+options.fullscreenNum+'&amp;autoplay='+options.autoplayNum+'&amp;show_title='+options.vmTitle+'&amp;show_byline='+options.vmByline+'&amp;show_portrait='+options.vmPortrait+'&amp;color='+options.vmColor, {
+						id: mediaId,
+						width: mediaWidth,
+						height: mediaHeight,
+						params: {wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+						});
+					startEffect();
+				}
+// 12seconds
+			} else if (URL.match(/12seconds\.tv/i)) {
+				mediaType = 'obj';
+				mediaWidth = mediaWidth || "430px";
+				mediaHeight = mediaHeight || "360px";
+				mediaSplit = URL.split('/');
+				mediaId = mediaSplit[5];
+				preload = new Swiff('http://embed.12seconds.tv/players/remotePlayer.swf', {
+					id: mediaId,
+					width: mediaWidth,
+					height: mediaHeight,
+					params: {flashvars: 'vid='+mediaId+'', wmode: options.wmode, bgcolor: options.bgcolor, allowscriptaccess: options.scriptaccess, allowfullscreen: options.fullscreen}
+					});
+				startEffect();
+
+	/*	Specific Content Types	*/
+
+// INLINE
+			} else if (URL.match(/\#mb_/i)) {
+				mediaType = 'inline';
+				mediaWidth = mediaWidth || options.defaultWidth;
+				mediaHeight = mediaHeight || options.defaultHeight;
+				URLsplit = URL.split('#');
+				preload = document.id(URLsplit[1]).get('html');
+				startEffect();
+// HTML
+			} else {
+				mediaType = 'url';
+				mediaWidth = mediaWidth || options.defaultWidth;
+				mediaHeight = mediaHeight || options.defaultHeight;
+				mediaId = "mediaId_"+new Date().getTime();	// Safari may not update iframe content with a static id.
+				preload = new Element('iframe', {
+					'src': URL,
+					'id': mediaId,
+					'width': mediaWidth,
+					'height': mediaHeight,
+					'frameborder': 0
+					});
+				startEffect();
+			}
+		}
+		return false;
+	}
+
+	function startEffect() {
+		if (mediaType == "img"){
+			mediaWidth = preload.width;
+			mediaHeight = preload.height;
+			if (options.imgBackground) {
+				image.setStyles({backgroundImage: "url("+URL+")", display: ""});
+			} else {	// Thanks to Dusan Medlin for fixing large 16x9 image errors in a 4x3 browser
+				if (mediaHeight >= winHeight-options.imgPadding && (mediaHeight / winHeight) >= (mediaWidth / winWidth)) {
+					mediaHeight = winHeight-options.imgPadding;
+					mediaWidth = preload.width = parseInt((mediaHeight/preload.height)*mediaWidth);
+					preload.height = mediaHeight;
+				} else if (mediaWidth >= winWidth-options.imgPadding && (mediaHeight / winHeight) < (mediaWidth / winWidth)) {
+					mediaWidth = winWidth-options.imgPadding;
+					mediaHeight = preload.height = parseInt((mediaWidth/preload.width)*mediaHeight);
+					preload.width = mediaWidth;
+				}
+				if (Browser.Engine.trident) preload = document.id(preload);
+				preload.addEvent('mousedown', function(e){ e.stop(); }).addEvent('contextmenu', function(e){ e.stop(); });
+				image.setStyles({backgroundImage: "none", display: ""});
+				preload.inject(image);
+			}
+		} else if (mediaType == "obj") {
+			if (Browser.Plugins.Flash.version<8) {
+				image.setStyles({backgroundImage: "none", display: ""});
+				image.set('html', '<div id="mbError"><b>Error</b><br/>Adobe Flash is either not installed or not up to date, please visit <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" title="Get Flash" target="_new">Adobe.com</a> to download the free player.</div>');
+				mediaWidth = options.DefaultWidth;
+				mediaHeight = options.DefaultHeight;
+			} else {
+				image.setStyles({backgroundImage: "none", display: ""});
+				preload.inject(image);
+			}
+		} else if (mediaType == "qt") {
+			image.setStyles({backgroundImage: "none", display: ""});
+			preload;
+		} else if (mediaType == "inline") {
+//			if (options.overflow) image.setStyles({overflow: options.overflow});
+			image.setStyles({backgroundImage: "none", display: ""});
+			image.set('html', preload);
+		} else if (mediaType == "url") {
+			image.setStyles({backgroundImage: "none", display: ""});
+			preload.inject(image);
+		} else {
+			image.setStyles({backgroundImage: "none", display: ""});
+			image.set('html', '<div id="mbError"><b>Error</b><br/>A file type error has occoured, please visit <a href="iaian7.com/webcode/mediaboxAdvanced" title="mediaboxAdvanced" target="_new">iaian7.com</a> or contact the website author for more information.</div>');
+			mediaWidth = options.defaultWidth;
+			mediaHeight = options.defaultHeight;
+		}
+		image.setStyles({width: mediaWidth, height: mediaHeight});
+		caption.setStyles({width: mediaWidth});
+
+		title.set('html', (options.showCaption) ? captionSplit[0] : "");
+		caption.set('html', (options.showCaption && (captionSplit.length > 1)) ? captionSplit[1] : "");
+		number.set('html', (options.showCounter && (images.length > 1)) ? options.counterText.replace(/{x}/, activeImage + 1).replace(/{y}/, images.length) : "");
+		
+		if ((prevImage >= 0) && (images[prevImage][0].match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadPrev.src = images[prevImage][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
+		if ((nextImage >= 0) && (images[nextImage][0].match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadNext.src = images[nextImage][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
+
+		mediaWidth = image.offsetWidth;
+		mediaHeight = image.offsetHeight+bottom.offsetHeight;
+		if (mediaHeight >= top+top) { mTop = -top } else { mTop = -(mediaHeight/2) };
+		if (mediaWidth >= left+left) { mLeft = -left } else { mLeft = -(mediaWidth/2) };
+		if (options.resizeOpening) { fx.resize.start({width: mediaWidth, height: mediaHeight, marginTop: mTop-margin, marginLeft: mLeft-margin});
+		} else { center.setStyles({width: mediaWidth, height: mediaHeight, marginTop: mTop-margin, marginLeft: mLeft-margin}); imageAnimate(); }
+	}
+
+	function imageAnimate() {
+		fx.image.start(1);
+	}
+
+	function captionAnimate() {
+		center.className = "";
+		if (prevImage >= 0) prevLink.style.display = "";
+		if (nextImage >= 0) nextLink.style.display = "";
+		fx.bottom.start(1);
+	}
+
+	function stop() {
+		if (preload) preload.onload = $empty;
+		fx.resize.cancel();
+		fx.image.cancel().set(0);
+		fx.bottom.cancel().set(0);
+		$$(prevLink, nextLink).setStyle("display", "none");
+	}
+
+	function close() {
+		if (activeImage >= 0) {
+			preload.onload = $empty;
+			image.set('html', '');
+			for (var f in fx) fx[f].cancel();
+			center.setStyle("display", "none");
+			fx.overlay.chain(setup).start(0);
+		}
+		return false;
+	}
+})();
+
+	/*	Autoload code block	*/
+
+Mediabox.scanPage = function() {
+//	$$('#mb_').each(function(hide) { hide.set('display', 'none'); });
+	var links = $$("a").filter(function(el) {
+		return el.rel && el.rel.test(/^lightbox/i);
+	});
+	//[VB]
+	//$$(links).mediabox({/* Put custom options here */}, null, function(el) {
+	var _options = shadogoOptions || {};
+	$$(links).mediabox(_options, null, function(el) {
+		var rel0 = this.rel.replace(/[[]|]/gi," ");
+		var relsize = rel0.split(" ");
+		return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
+	});
+};
+window.addEvent("domready", Mediabox.scanPage);
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/mootools-1.2.5-core-yc.js
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/mootools-1.2.5-core-yc.js	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/mootools-1.2.5-core-yc.js	(revision 10016)
@@ -0,0 +1,3 @@
+//MooTools, <http://mootools.net>, My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
+
+var MooTools={version:"1.2.5",build:"008d8f0f2fcc2044e54fdd3635341aaab274e757"};var Native=function(l){l=l||{};var a=l.name;var j=l.legacy;var b=l.protect;var c=l.implement;var i=l.generics;var g=l.initialize;var h=l.afterImplement||function(){};var d=g||j;i=i!==false;d.constructor=Native;d.$family={name:"native"};if(j&&g){d.prototype=j.prototype;}d.prototype.constructor=d;if(a){var f=a.toLowerCase();d.prototype.$family={name:f};Native.typize(d,f);}var k=function(o,m,p,n){if(!b||n||!o.prototype[m]){o.prototype[m]=p;}if(i){Native.genericize(o,m,b);}h.call(o,m,p);return o;};d.alias=function(o,m,q){if(typeof o=="string"){var p=this.prototype[o];if((o=p)){return k(this,m,o,q);}}for(var n in o){this.alias(n,o[n],m);}return this;};d.implement=function(n,m,q){if(typeof n=="string"){return k(this,n,m,q);}for(var o in n){k(this,o,n[o],m);}return this;};if(c){d.implement(c);}return d;};Native.genericize=function(b,c,a){if((!a||!b[c])&&typeof b.prototype[c]=="function"){b[c]=function(){var d=Array.prototype.slice.call(arguments);return b.prototype[c].apply(d.shift(),d);};}};Native.implement=function(d,c){for(var b=0,a=d.length;b<a;b++){d[b].implement(c);}};Native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b);};}};(function(){var a={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var j in a){new Native({name:j,initialize:a[j],protect:true});}var d={"boolean":Boolean,"native":Native,object:Object};for(var c in d){Native.typize(d[c],c);}var h={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};for(var f in h){for(var b=h[f].length;b--;){Native.genericize(a[f],h[f][b],true);}}})();var Hash=new Native({name:"Hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getClean());}for(var b in a){this[b]=a[b];}return this;}});Hash.implement({forEach:function(b,c){for(var a in this){if(this.hasOwnProperty(a)){b.call(c,this[a],a,this);}}},getClean:function(){var b={};for(var a in this){if(this.hasOwnProperty(a)){b[a]=this[a];}}return b;},getLength:function(){var b=0;for(var a in this){if(this.hasOwnProperty(a)){b++;}}return b;}});Hash.alias("forEach","each");Array.implement({forEach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});Array.alias("forEach","each");function $A(b){if(b.item){var a=b.length,c=new Array(a);while(a--){c[a]=b[a];}return c;}return Array.prototype.slice.call(b);}function $arguments(a){return function(){return arguments[a];};}function $chk(a){return !!(a||a===0);}function $clear(a){clearTimeout(a);clearInterval(a);return null;}function $defined(a){return(a!=undefined);}function $each(c,b,d){var a=$type(c);((a=="arguments"||a=="collection"||a=="array")?Array:Hash).each(c,b,d);}function $empty(){}function $extend(c,a){for(var b in (a||{})){c[b]=a[b];}return c;}function $H(a){return new Hash(a);}function $lambda(a){return($type(a)=="function")?a:function(){return a;};}function $merge(){var a=Array.slice(arguments);a.unshift({});return $mixin.apply(null,a);}function $mixin(f){for(var d=1,a=arguments.length;d<a;d++){var b=arguments[d];if($type(b)!="object"){continue;}for(var c in b){var h=b[c],g=f[c];f[c]=(g&&$type(h)=="object"&&$type(g)=="object")?$mixin(g,h):$unlink(h);}}return f;}function $pick(){for(var b=0,a=arguments.length;b<a;b++){if(arguments[b]!=undefined){return arguments[b];}}return null;}function $random(b,a){return Math.floor(Math.random()*(a-b+1)+b);}function $splat(b){var a=$type(b);return(a)?((a!="array"&&a!="arguments")?[b]:b):[];}var $time=Date.now||function(){return +new Date;};function $try(){for(var b=0,a=arguments.length;b<a;b++){try{return arguments[b]();}catch(c){}}return null;}function $type(a){if(a==undefined){return false;}if(a.$family){return(a.$family.name=="number"&&!isFinite(a))?false:a.$family.name;}if(a.nodeName){switch(a.nodeType){case 1:return"element";case 3:return(/\S/).test(a.nodeValue)?"textnode":"whitespace";}}else{if(typeof a.length=="number"){if(a.callee){return"arguments";}else{if(a.item){return"collection";}}}}return typeof a;}function $unlink(c){var b;switch($type(c)){case"object":b={};for(var f in c){b[f]=$unlink(c[f]);}break;case"hash":b=new Hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}Array.implement({every:function(c,d){for(var b=0,a=this.length;b<a;b++){if(!c.call(d,this[b],b,this)){return false;}}return true;},filter:function(d,f){var c=[];for(var b=0,a=this.length;b<a;b++){if(d.call(f,this[b],b,this)){c.push(this[b]);}}return c;},clean:function(){return this.filter($defined);},indexOf:function(c,d){var a=this.length;for(var b=(d<0)?Math.max(0,a+d):d||0;b<a;b++){if(this[b]===c){return b;}}return -1;},map:function(d,f){var c=[];for(var b=0,a=this.length;b<a;b++){c[b]=d.call(f,this[b],b,this);}return c;},some:function(c,d){for(var b=0,a=this.length;b<a;b++){if(c.call(d,this[b],b,this)){return true;}}return false;},associate:function(c){var d={},b=Math.min(this.length,c.length);for(var a=0;a<b;a++){d[c[a]]=this[a];}return d;},link:function(c){var a={};for(var f=0,b=this.length;f<b;f++){for(var d in c){if(c[d](this[f])){a[d]=this[f];delete c[d];break;}}}return a;},contains:function(a,b){return this.indexOf(a,b)!=-1;},extend:function(c){for(var b=0,a=c.length;b<a;b++){this.push(c[b]);}return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null;},include:function(a){if(!this.contains(a)){this.push(a);}return this;},combine:function(c){for(var b=0,a=c.length;b<a;b++){this.include(c[b]);}return this;},erase:function(b){for(var a=this.length;a--;a){if(this[a]===b){this.splice(a,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var d=[];for(var b=0,a=this.length;b<a;b++){var c=$type(this[b]);if(!c){continue;}d=d.concat((c=="array"||c=="collection"||c=="arguments")?Array.flatten(this[b]):this[b]);}return d;},hexToRgb:function(b){if(this.length!=3){return null;}var a=this.map(function(c){if(c.length==1){c+=c;}return c.toInt(16);});return(b)?a:"rgb("+a+")";},rgbToHex:function(d){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!d){return"transparent";}var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}});String.implement({test:function(a,b){return((typeof a=="string")?new RegExp(a,b):a).test(this);},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim();},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null;},stripScripts:function(b){var a="";var c=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){a+=arguments[1]+"\n";return"";});if(b===true){$exec(a);}else{if($type(b)=="function"){b(a,c);}}return c;},substitute:function(a,b){return this.replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1);}return(a[c]!=undefined)?a[c]:"";});}});try{delete Function.prototype.bind;}catch(e){}Function.implement({extend:function(a){for(var b in a){this[b]=a[b];}return this;},create:function(b){var a=this;b=b||{};return function(d){var c=b.arguments;c=(c!=undefined)?$splat(c):Array.slice(arguments,(b.event)?1:0);if(b.event){c=[d||window.event].extend(c);}var f=function(){return a.apply(b.bind||null,c);};if(b.delay){return setTimeout(f,b.delay);}if(b.periodical){return setInterval(f,b.periodical);}if(b.attempt){return $try(f);}return f();};},run:function(a,b){return this.apply(b,$splat(a));},pass:function(a,b){return this.create({bind:b,arguments:a});},bind:function(b,a){return this.create({bind:b,arguments:a});},bindWithEvent:function(b,a){return this.create({bind:b,arguments:a,event:true});},attempt:function(a,b){return this.create({bind:b,arguments:a,attempt:true})();},delay:function(b,c,a){return this.create({bind:c,arguments:a,delay:b})();},periodical:function(c,b,a){return this.create({bind:b,arguments:a,periodical:c})();}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this));},round:function(a){a=Math.pow(10,a||0);return Math.round(this*a)/a;},times:function(b,c){for(var a=0;a<this;a++){b.call(c,a,this);}},toFloat:function(){return parseFloat(this);},toInt:function(a){return parseInt(this,a||10);}});Number.alias("times","each");(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat($A(arguments)));};}});Number.implement(a);})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a;}}return null;},hasValue:function(a){return(Hash.keyOf(this,a)!==null);},extend:function(a){Hash.each(a||{},function(c,b){Hash.set(this,b,c);},this);return this;},combine:function(a){Hash.each(a||{},function(c,b){Hash.include(this,b,c);},this);return this;},erase:function(a){if(this.hasOwnProperty(a)){delete this[a];}return this;},get:function(a){return(this.hasOwnProperty(a))?this[a]:null;},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b;}return this;},empty:function(){Hash.each(this,function(b,a){delete this[a];},this);return this;},include:function(a,b){if(this[a]==undefined){this[a]=b;}return this;},map:function(b,c){var a=new Hash;Hash.each(this,function(f,d){a.set(d,b.call(c,f,d,this));},this);return a;},filter:function(b,c){var a=new Hash;Hash.each(this,function(f,d){if(b.call(c,f,d,this)){a.set(d,f);}},this);return a;},every:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&!b.call(c,this[a],a)){return false;}}return true;},some:function(b,c){for(var a in this){if(this.hasOwnProperty(a)&&b.call(c,this[a],a)){return true;}}return false;},getKeys:function(){var a=[];Hash.each(this,function(c,b){a.push(b);});return a;},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b);});return a;},toQueryString:function(a){var b=[];Hash.each(this,function(g,f){if(a){f=a+"["+f+"]";}var d;switch($type(g)){case"object":d=Hash.toQueryString(g,f);break;case"array":var c={};g.each(function(j,h){c[h]=j;});d=Hash.toQueryString(c,f);break;default:d=f+"="+encodeURIComponent(g);}if(g!=undefined){b.push(d);}});return b.join("&");}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});function Class(b){if(b instanceof Function){b={initialize:b};}var a=function(){Object.reset(this);if(a._prototyping){return this;}this._current=$empty;var c=(this.initialize)?this.initialize.apply(this,arguments):this;delete this._current;delete this.caller;return c;}.extend(this);a.implement(b);a.constructor=Class;a.prototype.constructor=a;return a;}Function.prototype.protect=function(){this._protected=true;return this;};Object.reset=function(a,c){if(c==null){for(var f in a){Object.reset(a,f);}return a;}delete a[c];switch($type(a[c])){case"object":var d=function(){};d.prototype=a[c];var b=new d;a[c]=Object.reset(b);break;case"array":a[c]=$unlink(a[c]);break;}return a;};new Native({name:"Class",initialize:Class}).extend({instantiate:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a;},wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new Error('The method "'+b+'" cannot be called.');}var f=this.caller,g=this._current;this.caller=g;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=g;this.caller=f;return d;}.extend({_owner:a,_origin:c,_name:b});}});Class.implement({implement:function(a,d){if($type(a)=="object"){for(var f in a){this.implement(f,a[f]);}return this;}var g=Class.Mutators[a];if(g){d=g.call(this,d);if(d==null){return this;}}var c=this.prototype;switch($type(d)){case"function":if(d._hidden){return this;}c[a]=Class.wrap(this,a,d);break;case"object":var b=c[a];if($type(b)=="object"){$mixin(b,d);}else{c[a]=$unlink(d);}break;case"array":c[a]=$unlink(d);break;default:c[a]=d;}return this;}});Class.Mutators={Extends:function(a){this.parent=a;this.prototype=Class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new Error('The method "'+b+'" has no parent.');}return c.apply(this,arguments);}.protect());},Implements:function(a){$splat(a).each(function(b){if(b instanceof Function){b=Class.instantiate(b);}this.implement(b);},this);}};var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();return this;}});var Events=new Class({$events:{},addEvent:function(c,b,a){c=Events.removeOn(c);if(b!=$empty){this.$events[c]=this.$events[c]||[];this.$events[c].include(b);if(a){b.internal=true;}}return this;},addEvents:function(a){for(var b in a){this.addEvent(b,a[b]);}return this;},fireEvent:function(c,b,a){c=Events.removeOn(c);if(!this.$events||!this.$events[c]){return this;}this.$events[c].each(function(d){d.create({bind:this,delay:a,"arguments":b})();},this);return this;},removeEvent:function(b,a){b=Events.removeOn(b);if(!this.$events[b]){return this;}if(!a.internal){this.$events[b].erase(a);}return this;},removeEvents:function(c){var d;if($type(c)=="object"){for(d in c){this.removeEvent(d,c[d]);}return this;}if(c){c=Events.removeOn(c);}for(d in this.$events){if(c&&c!=d){continue;}var b=this.$events[d];for(var a=b.length;a--;a){this.removeEvent(d,b[a]);}}return this;}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(b,c){return c.toLowerCase();});};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this;}for(var a in this.options){if($type(this.options[a])!="function"||!(/^on[A-Z]/).test(a)){continue;}this.addEvent(a,this.options[a]);delete this.options[a];}return this;}});var Browser=$merge({Engine:{name:"unknown",version:0},Platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()},Features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)},Plugins:{},Engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925));},trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?((document.querySelectorAll)?6:5):4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419);},gecko:function(){return(!document.getBoxObjectFor&&window.mozInnerScreenX==null)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true;Browser.detect=function(){for(var b in this.Engines){var a=this.Engines[b]();if(a){this.Engine={name:b,version:a};this.Engine[b]=this.Engine[b+a]=true;break;}}return{name:b,version:a};};Browser.detect();Browser.Request=function(){return $try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject("MSXML2.XMLHTTP");},function(){return new ActiveXObject("Microsoft.XMLHTTP");});};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var a=($try(function(){return navigator.plugins["Shockwave Flash"].description;},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);return{version:parseInt(a[0]||0+"."+a[1],10)||0,build:parseInt(a[2],10)||0};})();function $exec(b){if(!b){return b;}if(window.execScript){window.execScript(b);}else{var a=document.createElement("script");a.setAttribute("type","text/javascript");a[(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerText":"text"]=b;document.head.appendChild(a);document.head.removeChild(a);}return b;}Native.UID=1;var $uid=(Browser.Engine.trident)?function(a){return(a.uid||(a.uid=[Native.UID++]))[0];}:function(a){return a.uid||(a.uid=Native.UID++);};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(a){$uid(a);if(!a.Element){a.Element=$empty;if(Browser.Engine.webkit){a.document.createElement("iframe");}a.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{};}a.document.window=a;return $extend(a,Window.Prototype);},afterImplement:function(b,a){window[b]=Window.Prototype[b]=a;}});Window.Prototype={$family:{name:"window"}};new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(a){$uid(a);a.head=a.getElementsByTagName("head")[0];a.html=a.getElementsByTagName("html")[0];if(Browser.Engine.trident&&Browser.Engine.version<=4){$try(function(){a.execCommand("BackgroundImageCache",false,true);});}if(Browser.Engine.trident){a.window.attachEvent("onunload",function(){a.window.detachEvent("onunload",arguments.callee);a.head=a.html=a.window=null;});}return $extend(a,Document.Prototype);},afterImplement:function(b,a){document[b]=Document.Prototype[b]=a;}});Document.Prototype={$family:{name:"document"}};new Document(document);var Element=new Native({name:"Element",legacy:window.Element,initialize:function(a,b){var c=Element.Constructors.get(a);if(c){return c(b);}if(typeof a=="string"){return document.newElement(a,b);}return document.id(a).set(b);},afterImplement:function(a,b){Element.Prototype[a]=b;if(Array[a]){return;}Elements.implement(a,function(){var c=[],h=true;for(var f=0,d=this.length;f<d;f++){var g=this[f][a].apply(this[f],arguments);c.push(g);if(h){h=($type(g)=="element");}}return(h)?new Elements(c):c;});}});Element.Prototype={$family:{name:"element"}};Element.Constructors=new Hash;var IFrame=new Native({name:"IFrame",generics:false,initialize:function(){var g=Array.link(arguments,{properties:Object.type,iframe:$defined});var d=g.properties||{};var c=document.id(g.iframe);var f=d.onload||$empty;delete d.onload;d.id=d.name=$pick(d.id,d.name,c?(c.id||c.name):"IFrame_"+$time());c=new Element(c||"iframe",d);var b=function(){var h=$try(function(){return c.contentWindow.location.host;});if(!h||h==window.location.host){var i=new Window(c.contentWindow);new Document(c.contentWindow.document);$extend(i.Element.prototype,Element.Prototype);}f.call(c.contentWindow,c.contentWindow.document);};var a=$try(function(){return c.contentWindow;});((a&&a.document.body)||window.frames[d.id])?b():c.addListener("load",b);return c;}});var Elements=new Native({initialize:function(g,b){b=$extend({ddup:true,cash:true},b);g=g||[];if(b.ddup||b.cash){var h={},f=[];for(var c=0,a=g.length;c<a;c++){var d=document.id(g[c],!b.cash);if(b.ddup){if(h[d.uid]){continue;}h[d.uid]=true;}if(d){f.push(d);}}g=f;}return(b.cash)?$extend(g,this):g;}});Elements.implement({filter:function(a,b){if(!a){return this;}return new Elements(Array.filter(this,(typeof a=="string")?function(c){return c.match(a);}:a,b));}});(function(){var d;try{var a=document.createElement("<input name=x>");d=(a.name=="x");}catch(b){}var c=function(f){return(""+f).replace(/&/g,"&amp;").replace(/"/g,"&quot;");};Document.implement({newElement:function(f,g){if(g&&g.checked!=null){g.defaultChecked=g.checked;}if(d&&g){f="<"+f;if(g.name){f+=' name="'+c(g.name)+'"';}if(g.type){f+=' type="'+c(g.type)+'"';}f+=">";delete g.name;delete g.type;}return this.id(this.createElement(f)).set(g);},newTextNode:function(f){return this.createTextNode(f);},getDocument:function(){return this;},getWindow:function(){return this.window;},id:(function(){var f={string:function(i,h,g){i=g.getElementById(i);return(i)?f.element(i,h):null;},element:function(g,j){$uid(g);if(!j&&!g.$family&&!(/^object|embed$/i).test(g.tagName)){var h=Element.Prototype;for(var i in h){g[i]=h[i];}}return g;},object:function(h,i,g){if(h.toElement){return f.element(h.toElement(g),i);}return null;}};f.textnode=f.whitespace=f.window=f.document=$arguments(0);return function(h,j,i){if(h&&h.$family&&h.uid){return h;}var g=$type(h);return(f[g])?f[g](h,j,i||document):null;};})()});})();if(window.$==null){Window.implement({$:function(a,b){return document.id(a,b,this.document);}});}Window.implement({$$:function(a){if(arguments.length==1&&typeof a=="string"){return this.document.getElements(a);}var g=[];var c=Array.flatten(arguments);for(var d=0,b=c.length;d<b;d++){var f=c[d];switch($type(f)){case"element":g.push(f);break;case"string":g.extend(this.document.getElements(f,true));}}return new Elements(g);},getDocument:function(){return this.document;},getWindow:function(){return this;}});Native.implement([Element,Document],{getElement:function(a,b){return document.id(this.getElements(a,true)[0]||null,b);},getElements:function(a,d){a=a.split(",");var c=[];var b=(a.length>1);a.each(function(f){var g=this.getElementsByTagName(f.trim());(b)?c.extend(g):c=g;},this);return new Elements(c,{ddup:b,cash:!d});}});(function(){var i={},g={};var j={input:"checked",option:"selected",textarea:(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerHTML":"value"};var c=function(m){return(g[m]||(g[m]={}));};var h=function(o,m){if(!o){return;}var n=o.uid;if(m!==true){m=false;}if(Browser.Engine.trident){if(o.clearAttributes){var r=m&&o.cloneNode(false);o.clearAttributes();if(r){o.mergeAttributes(r);}}else{if(o.removeEvents){o.removeEvents();}}if((/object/i).test(o.tagName)){for(var q in o){if(typeof o[q]=="function"){o[q]=$empty;}}Element.dispose(o);}}if(!n){return;}i[n]=g[n]=null;};var d=function(){Hash.each(i,h);if(Browser.Engine.trident){$A(document.getElementsByTagName("object")).each(h);}if(window.CollectGarbage){CollectGarbage();}i=g=null;};var k=function(o,m,t,n,q,s){var p=o[t||m];var r=[];while(p){if(p.nodeType==1&&(!n||Element.match(p,n))){if(!q){return document.id(p,s);}r.push(p);}p=p[m];}return(q)?new Elements(r,{ddup:false,cash:!s}):null;};var f={html:"innerHTML","class":"className","for":"htmlFor",defaultValue:"defaultValue",text:(Browser.Engine.trident||(Browser.Engine.webkit&&Browser.Engine.version<420))?"innerText":"textContent"};var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var l=["value","type","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"];b=b.associate(b);Hash.extend(f,b);Hash.extend(f,l.associate(l.map(String.toLowerCase)));var a={before:function(n,m){if(m.parentNode){m.parentNode.insertBefore(n,m);}},after:function(n,m){if(!m.parentNode){return;}var o=m.nextSibling;(o)?m.parentNode.insertBefore(n,o):m.parentNode.appendChild(n);},bottom:function(n,m){m.appendChild(n);},top:function(n,m){var o=m.firstChild;(o)?m.insertBefore(n,o):m.appendChild(n);}};a.inside=a.bottom;Hash.each(a,function(m,n){n=n.capitalize();Element.implement("inject"+n,function(o){m(this,document.id(o,true));return this;});Element.implement("grab"+n,function(o){m(document.id(o,true),this);return this;});});Element.implement({set:function(q,n){switch($type(q)){case"object":for(var o in q){this.set(o,q[o]);}break;case"string":var m=Element.Properties.get(q);(m&&m.set)?m.set.apply(this,Array.slice(arguments,1)):this.setProperty(q,n);}return this;},get:function(n){var m=Element.Properties.get(n);return(m&&m.get)?m.get.apply(this,Array.slice(arguments,1)):this.getProperty(n);},erase:function(n){var m=Element.Properties.get(n);(m&&m.erase)?m.erase.apply(this):this.removeProperty(n);return this;},setProperty:function(n,o){var m=f[n];if(o==undefined){return this.removeProperty(n);}if(m&&b[n]){o=!!o;}(m)?this[m]=o:this.setAttribute(n,""+o);return this;},setProperties:function(m){for(var n in m){this.setProperty(n,m[n]);}return this;},getProperty:function(n){var m=f[n];var o=(m)?this[m]:this.getAttribute(n,2);return(b[n])?!!o:(m)?o:o||null;},getProperties:function(){var m=$A(arguments);return m.map(this.getProperty,this).associate(m);},removeProperty:function(n){var m=f[n];(m)?this[m]=(m&&b[n])?false:"":this.removeAttribute(n);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},hasClass:function(m){return this.className.contains(m," ");},addClass:function(m){if(!this.hasClass(m)){this.className=(this.className+" "+m).clean();}return this;},removeClass:function(m){this.className=this.className.replace(new RegExp("(^|\\s)"+m+"(?:\\s|$)"),"$1");return this;},toggleClass:function(m){return this.hasClass(m)?this.removeClass(m):this.addClass(m);},adopt:function(){Array.flatten(arguments).each(function(m){m=document.id(m,true);if(m){this.appendChild(m);}},this);return this;},appendText:function(n,m){return this.grab(this.getDocument().newTextNode(n),m);},grab:function(n,m){a[m||"bottom"](document.id(n,true),this);return this;},inject:function(n,m){a[m||"bottom"](this,document.id(n,true));return this;},replaces:function(m){m=document.id(m,true);m.parentNode.replaceChild(this,m);return this;},wraps:function(n,m){n=document.id(n,true);return this.replaces(n).grab(n,m);},getPrevious:function(m,n){return k(this,"previousSibling",null,m,false,n);},getAllPrevious:function(m,n){return k(this,"previousSibling",null,m,true,n);},getNext:function(m,n){return k(this,"nextSibling",null,m,false,n);},getAllNext:function(m,n){return k(this,"nextSibling",null,m,true,n);},getFirst:function(m,n){return k(this,"nextSibling","firstChild",m,false,n);},getLast:function(m,n){return k(this,"previousSibling","lastChild",m,false,n);},getParent:function(m,n){return k(this,"parentNode",null,m,false,n);},getParents:function(m,n){return k(this,"parentNode",null,m,true,n);},getSiblings:function(m,n){return this.getParent().getChildren(m,n).erase(this);},getChildren:function(m,n){return k(this,"nextSibling","firstChild",m,true,n);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(p,o){var n=this.ownerDocument.getElementById(p);if(!n){return null;}for(var m=n.parentNode;m!=this;m=m.parentNode){if(!m){return null;}}return document.id(n,o);},getSelected:function(){return new Elements($A(this.options).filter(function(m){return m.selected;}));},getComputedStyle:function(n){if(this.currentStyle){return this.currentStyle[n.camelCase()];}var m=this.getDocument().defaultView.getComputedStyle(this,null);return(m)?m.getPropertyValue([n.hyphenate()]):null;},toQueryString:function(){var m=[];this.getElements("input, select, textarea",true).each(function(n){if(!n.name||n.disabled||n.type=="submit"||n.type=="reset"||n.type=="file"){return;}var o=(n.tagName.toLowerCase()=="select")?Element.getSelected(n).map(function(p){return p.value;}):((n.type=="radio"||n.type=="checkbox")&&!n.checked)?null:n.value;$splat(o).each(function(p){if(typeof p!="undefined"){m.push(n.name+"="+encodeURIComponent(p));}});});return m.join("&");},clone:function(p,m){p=p!==false;var s=this.cloneNode(p);var o=function(w,v){if(!m){w.removeAttribute("id");}if(Browser.Engine.trident){w.clearAttributes();w.mergeAttributes(v);w.removeAttribute("uid");if(w.options){var x=w.options,t=v.options;for(var u=x.length;u--;){x[u].selected=t[u].selected;}}}var y=j[v.tagName.toLowerCase()];if(y&&v[y]){w[y]=v[y];}};if(p){var q=s.getElementsByTagName("*"),r=this.getElementsByTagName("*");for(var n=q.length;n--;){o(q[n],r[n]);}}o(s,this);return document.id(s);},destroy:function(){Element.empty(this);Element.dispose(this);h(this,true);return null;},empty:function(){$A(this.childNodes).each(function(m){Element.destroy(m);});return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;},hasChild:function(m){m=document.id(m,true);if(!m){return false;}if(Browser.Engine.webkit&&Browser.Engine.version<420){return $A(this.getElementsByTagName(m.tagName)).contains(m);}return(this.contains)?(this!=m&&this.contains(m)):!!(this.compareDocumentPosition(m)&16);},match:function(m){return(!m||(m==this)||(Element.get(this,"tag")==m));}});Native.implement([Element,Window,Document],{addListener:function(p,o){if(p=="unload"){var m=o,n=this;o=function(){n.removeListener("unload",o);m();};}else{i[this.uid]=this;}if(this.addEventListener){this.addEventListener(p,o,false);}else{this.attachEvent("on"+p,o);}return this;},removeListener:function(n,m){if(this.removeEventListener){this.removeEventListener(n,m,false);}else{this.detachEvent("on"+n,m);}return this;},retrieve:function(n,m){var p=c(this.uid),o=p[n];if(m!=undefined&&o==undefined){o=p[n]=m;}return $pick(o);},store:function(n,m){var o=c(this.uid);o[n]=m;return this;},eliminate:function(m){var n=c(this.uid);delete n[m];return this;}});window.addListener("unload",d);})();Element.Properties=new Hash;Element.Properties.style={set:function(a){this.style.cssText=a;},get:function(){return this.style.cssText;},erase:function(){this.style.cssText="";}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};Element.Properties.html=(function(){var c=document.createElement("div");var a={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};a.thead=a.tfoot=a.tbody;var b={set:function(){var f=Array.flatten(arguments).join("");var g=Browser.Engine.trident&&a[this.get("tag")];if(g){var h=c;h.innerHTML=g[1]+f+g[2];for(var d=g[0];d--;){h=h.firstChild;}this.empty().adopt(h.childNodes);}else{this.innerHTML=f;}}};b.erase=b.set;return b;})();if(Browser.Engine.webkit&&Browser.Engine.version<420){Element.Properties.text={get:function(){if(this.innerText){return this.innerText;}var a=this.ownerDocument.newElement("div",{html:this.innerHTML}).inject(this.ownerDocument.body);var b=a.innerText;a.destroy();return b;}};}(function(){Element.implement({scrollTo:function(i,j){if(b(this)){this.getWindow().scrollTo(i,j);}else{this.scrollLeft=i;this.scrollTop=j;}return this;},getSize:function(){if(b(this)){return this.getWindow().getSize();}return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(b(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(b(this)){return this.getWindow().getScroll();}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var j=this,i={x:0,y:0};while(j&&!b(j)){i.x+=j.scrollLeft;i.y+=j.scrollTop;j=j.parentNode;}return i;},getOffsetParent:function(){var i=this;if(b(i)){return null;}if(!Browser.Engine.trident){return i.offsetParent;}while((i=i.parentNode)&&!b(i)){if(d(i,"position")!="static"){return i;}}return null;},getOffsets:function(){if(this.getBoundingClientRect){var k=this.getBoundingClientRect(),n=document.id(this.getDocument().documentElement),q=n.getScroll(),l=this.getScrolls(),j=this.getScroll(),i=(d(this,"position")=="fixed");return{x:k.left.toInt()+l.x-j.x+((i)?0:q.x)-n.clientLeft,y:k.top.toInt()+l.y-j.y+((i)?0:q.y)-n.clientTop};}var m=this,o={x:0,y:0};if(b(this)){return o;}while(m&&!b(m)){o.x+=m.offsetLeft;o.y+=m.offsetTop;if(Browser.Engine.gecko){if(!g(m)){o.x+=c(m);o.y+=h(m);}var p=m.parentNode;if(p&&d(p,"overflow")!="visible"){o.x+=c(p);o.y+=h(p);}}else{if(m!=this&&Browser.Engine.webkit){o.x+=c(m);o.y+=h(m);}}m=m.offsetParent;}if(Browser.Engine.gecko&&!g(this)){o.x-=c(this);o.y-=h(this);}return o;},getPosition:function(l){if(b(this)){return{x:0,y:0};}var m=this.getOffsets(),j=this.getScrolls();var i={x:m.x-j.x,y:m.y-j.y};var k=(l&&(l=document.id(l)))?l.getPosition():{x:0,y:0};return{x:i.x-k.x,y:i.y-k.y};},getCoordinates:function(k){if(b(this)){return this.getWindow().getCoordinates();}var i=this.getPosition(k),j=this.getSize();var l={left:i.x,top:i.y,width:j.x,height:j.y};l.right=l.left+l.width;l.bottom=l.top+l.height;return l;},computePosition:function(i){return{left:i.x-f(this,"margin-left"),top:i.y-f(this,"margin-top")};},setPosition:function(i){return this.setStyles(this.computePosition(i));}});Native.implement([Document,Window],{getSize:function(){if(Browser.Engine.presto||Browser.Engine.webkit){var j=this.getWindow();return{x:j.innerWidth,y:j.innerHeight};}var i=a(this);return{x:i.clientWidth,y:i.clientHeight};},getScroll:function(){var j=this.getWindow(),i=a(this);return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop};},getScrollSize:function(){var j=a(this),i=this.getSize();return{x:Math.max(j.scrollWidth,i.x),y:Math.max(j.scrollHeight,i.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var i=this.getSize();return{top:0,left:0,bottom:i.y,right:i.x,height:i.y,width:i.x};}});var d=Element.getComputedStyle;function f(i,j){return d(i,j).toInt()||0;}function g(i){return d(i,"-moz-box-sizing")=="border-box";}function h(i){return f(i,"border-top-width");}function c(i){return f(i,"border-left-width");}function b(i){return(/^(?:body|html)$/i).test(i.tagName);}function a(i){var j=i.getDocument();return(!j.compatMode||j.compatMode=="CSS1Compat")?j.html:j.body;}})();Element.alias("setPosition","position");Native.implement([Window,Document,Element],{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;}});var Event=new Native({name:"Event",initialize:function(a,g){g=g||window;var l=g.document;a=a||g.event;if(a.$extended){return a;}this.$extended=true;var k=a.type;var h=a.target||a.srcElement;while(h&&h.nodeType==3){h=h.parentNode;}if(k.test(/key/)){var b=a.which||a.keyCode;var n=Event.Keys.keyOf(b);if(k=="keydown"){var d=b-111;if(d>0&&d<13){n="f"+d;}}n=n||String.fromCharCode(b).toLowerCase();}else{if(k.match(/(click|mouse|menu)/i)){l=(!l.compatMode||l.compatMode=="CSS1Compat")?l.html:l.body;var j={x:a.pageX||a.clientX+l.scrollLeft,y:a.pageY||a.clientY+l.scrollTop};var c={x:(a.pageX)?a.pageX-g.pageXOffset:a.clientX,y:(a.pageY)?a.pageY-g.pageYOffset:a.clientY};if(k.match(/DOMMouseScroll|mousewheel/)){var i=(a.wheelDelta)?a.wheelDelta/120:-(a.detail||0)/3;}var f=(a.which==3)||(a.button==2);var m=null;if(k.match(/over|out/)){switch(k){case"mouseover":m=a.relatedTarget||a.fromElement;break;case"mouseout":m=a.relatedTarget||a.toElement;}if(!(function(){while(m&&m.nodeType==3){m=m.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){m=false;}}}}return $extend(this,{event:a,type:k,page:j,client:c,rightClick:f,wheel:i,relatedTarget:m,target:h,code:b,key:n,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey});}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();}else{this.event.returnValue=false;}return this;}});Element.Properties.events={set:function(a){this.addEvents(a);}};Native.implement([Element,Window,Document],{addEvent:function(f,h){var i=this.retrieve("events",{});i[f]=i[f]||{keys:[],values:[]};if(i[f].keys.contains(h)){return this;}i[f].keys.push(h);var g=f,a=Element.Events.get(f),c=h,j=this;if(a){if(a.onAdd){a.onAdd.call(this,h);}if(a.condition){c=function(k){if(a.condition.call(this,k)){return h.call(this,k);}return true;};}g=a.base||g;}var d=function(){return h.call(j);};var b=Element.NativeEvents[g];if(b){if(b==2){d=function(k){k=new Event(k,j.getWindow());if(c.call(j,k)===false){k.stop();}};}this.addListener(g,d);}i[f].values.push(d);return this;},removeEvent:function(c,b){var a=this.retrieve("events");if(!a||!a[c]){return this;}var g=a[c].keys.indexOf(b);if(g==-1){return this;}a[c].keys.splice(g,1);var f=a[c].values.splice(g,1)[0];var d=Element.Events.get(c);if(d){if(d.onRemove){d.onRemove.call(this,b);}c=d.base||c;}return(Element.NativeEvents[c])?this.removeListener(c,f):this;},addEvents:function(a){for(var b in a){this.addEvent(b,a[b]);}return this;},removeEvents:function(a){var c;if($type(a)=="object"){for(c in a){this.removeEvent(c,a[c]);}return this;}var b=this.retrieve("events");if(!b){return this;}if(!a){for(c in b){this.removeEvents(c);}this.eliminate("events");}else{if(b[a]){while(b[a].keys[0]){this.removeEvent(a,b[a].keys[0]);}b[a]=null;}}return this;},fireEvent:function(d,b,a){var c=this.retrieve("events");if(!c||!c[d]){return this;}c[d].keys.each(function(f){f.create({bind:this,delay:a,"arguments":b})();},this);return this;},cloneEvents:function(d,a){d=document.id(d);var c=d.retrieve("events");if(!c){return this;}if(!a){for(var b in c){this.cloneEvents(d,b);}}else{if(c[a]){c[a].keys.each(function(f){this.addEvent(a,f);},this);}}return this;}});try{if(typeof HTMLElement!="undefined"){HTMLElement.prototype.fireEvent=Element.prototype.fireEvent;}}catch(e){}Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};(function(){var a=function(b){var c=b.relatedTarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="xul"&&!this.hasChild(c));};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}});})();Element.Properties.styles={set:function(a){this.setStyles(a);}};Element.Properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden";}}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1;}if(Browser.Engine.trident){this.style.filter=(a==1)?"":"alpha(opacity="+a*100+")";}this.style.opacity=a;this.store("opacity",a);},get:function(){return this.retrieve("opacity",1);}};Element.implement({setOpacity:function(a){return this.set("opacity",a,true);},getOpacity:function(){return this.get("opacity");},setStyle:function(b,a){switch(b){case"opacity":return this.set("opacity",parseFloat(a));case"float":b=(Browser.Engine.trident)?"styleFloat":"cssFloat";}b=b.camelCase();if($type(a)!="string"){var c=(Element.Styles.get(b)||"@").split(" ");a=$splat(a).map(function(f,d){if(!c[d]){return"";}return($type(f)=="number")?c[d].replace("@",Math.round(f)):f;}).join(" ");}else{if(a==String(Number(a))){a=Math.round(a);}}this.style[b]=a;return this;},getStyle:function(h){switch(h){case"opacity":return this.get("opacity");case"float":h=(Browser.Engine.trident)?"styleFloat":"cssFloat";}h=h.camelCase();var a=this.style[h];if(!$chk(a)){a=[];for(var g in Element.ShortStyles){if(h!=g){continue;}for(var f in Element.ShortStyles[g]){a.push(this.getStyle(f));}return a.join(" ");}a=this.getComputedStyle(h);}if(a){a=String(a);var c=a.match(/rgba?\([\d\s,]+\)/);if(c){a=a.replace(c[0],c[0].rgbToHex());}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(a,10)))){if(h.test(/^(height|width)$/)){var b=(h=="width")?["left","right"]:["top","bottom"],d=0;b.each(function(i){d+=this.getStyle("border-"+i+"-width").toInt()+this.getStyle("padding-"+i).toInt();},this);return this["offset"+h.capitalize()]-d+"px";}if((Browser.Engine.presto)&&String(a).test("px")){return a;}if(h.test(/(border(.+)Width|margin|padding)/)){return"0px";}}return a;},setStyles:function(b){for(var a in b){this.setStyle(a,b[a]);}return this;},getStyles:function(){var a={};Array.flatten(arguments).each(function(b){a[b]=this.getStyle(b);},this);return a;}});Element.Styles=new Hash({left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"});Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(h){var g=Element.ShortStyles;var b=Element.Styles;["margin","padding"].each(function(i){var j=i+h;g[i][j]=b[j]="@px";});var f="border"+h;g.border[f]=b[f]="@px @ rgb(@, @, @)";var d=f+"Width",a=f+"Style",c=f+"Color";g[f]={};g.borderWidth[d]=g[f][d]=b[d]="@px";g.borderStyle[a]=g[f][a]=b[a]="@";g.borderColor[c]=g[f][c]=b[c]="rgb(@, @, @)";});var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore"},initialize:function(a){this.subject=this.subject||this;this.setOptions(a);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var b=this.options.wait;if(b===false){this.options.link="cancel";}},getTransition:function(){return function(a){return -(Math.cos(Math.PI*a)-1)/2;};},step:function(){var a=$time();if(a<this.time+this.options.duration){var b=this.transition((a-this.time)/this.options.duration);this.set(this.compute(this.from,this.to,b));}else{this.set(this.compute(this.from,this.to,1));this.complete();}},set:function(a){return a;},compute:function(c,b,a){return Fx.compute(c,b,a);},check:function(){if(!this.timer){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},start:function(b,a){if(!this.check(b,a)){return this;}this.from=b;this.to=a;this.time=0;this.transition=this.getTransition();this.startTimer();this.onStart();return this;},complete:function(){if(this.stopTimer()){this.onComplete();}return this;},cancel:function(){if(this.stopTimer()){this.onCancel();}return this;},onStart:function(){this.fireEvent("start",this.subject);},onComplete:function(){this.fireEvent("complete",this.subject);if(!this.callChain()){this.fireEvent("chainComplete",this.subject);}},onCancel:function(){this.fireEvent("cancel",this.subject).clearChain();},pause:function(){this.stopTimer();return this;},resume:function(){this.startTimer();return this;},stopTimer:function(){if(!this.timer){return false;}this.time=$time()-this.time;this.timer=$clear(this.timer);return true;},startTimer:function(){if(this.timer){return false;}this.time=$time()-this.time;this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);return true;}});Fx.compute=function(c,b,a){return(b-c)*a+c;};Fx.Durations={"short":250,normal:500,"long":1000};Fx.CSS=new Class({Extends:Fx,prepare:function(d,f,b){b=$splat(b);var c=b[1];if(!$chk(c)){b[1]=b[0];b[0]=d.getStyle(f);}var a=b.map(this.parse);return{from:a[0],to:a[1]};},parse:function(a){a=$lambda(a)();a=(typeof a=="string")?a.split(" "):$splat(a);return a.map(function(c){c=String(c);var b=false;Fx.CSS.Parsers.each(function(g,f){if(b){return;}var d=g.parse(c);if($chk(d)){b={value:d,parser:g};}});b=b||{value:c,parser:Fx.CSS.Parsers.String};return b;});},compute:function(d,c,b){var a=[];(Math.min(d.length,c.length)).times(function(f){a.push({value:d[f].parser.compute(d[f].value,c[f].value,b),parser:d[f].parser});});a.$family={name:"fx:css:value"};return a;},serve:function(c,b){if($type(c)!="fx:css:value"){c=this.parse(c);}var a=[];c.each(function(d){a=a.concat(d.parser.serve(d.value,b));});return a;},render:function(a,d,c,b){a.setStyle(d,this.serve(c,b));},search:function(a){if(Fx.CSS.Cache[a]){return Fx.CSS.Cache[a];}var b={};Array.each(document.styleSheets,function(f,d){var c=f.href;if(c&&c.contains("://")&&!c.contains(document.domain)){return;}var g=f.rules||f.cssRules;Array.each(g,function(k,h){if(!k.style){return;}var j=(k.selectorText)?k.selectorText.replace(/^\w+/,function(i){return i.toLowerCase();}):null;if(!j||!j.test("^"+a+"$")){return;}Element.Styles.each(function(l,i){if(!k.style[i]||Element.ShortStyles[i]){return;}l=String(k.style[i]);b[i]=(l.test(/^rgb/))?l.rgbToHex():l;});});});return Fx.CSS.Cache[a]=b;}});Fx.CSS.Cache={};Fx.CSS.Parsers=new Hash({Color:{parse:function(a){if(a.match(/^#[0-9a-f]{3,6}$/i)){return a.hexToRgb(true);}return((a=a.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[a[1],a[2],a[3]]:false;},compute:function(c,b,a){return c.map(function(f,d){return Math.round(Fx.compute(c[d],b[d],a));});},serve:function(a){return a.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(b,a){return(a)?b+a:b;}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);},set:function(a){if(typeof a=="string"){a=this.search(a);}for(var b in a){this.render(this.element,b,a[b],this.options.unit);}return this;},compute:function(f,d,c){var a={};for(var b in f){a[b]=this.parent(f[b],d[b],c);}return a;},start:function(b){if(!this.check(b)){return this;}if(typeof b=="string"){b=this.search(b);}var f={},d={};for(var c in b){var a=this.prepare(this.element,c,b[c]);f[c]=a.from;d[c]=a.to;}return this.parent(f,d);}});Element.Properties.morph={set:function(a){var b=this.retrieve("morph");if(b){b.cancel();}return this.eliminate("morph").store("morph:options",$extend({link:"cancel"},a));},get:function(a){if(a||!this.retrieve("morph")){if(a||!this.retrieve("morph:options")){this.set("morph",a);}this.store("morph",new Fx.Morph(this,this.retrieve("morph:options")));}return this.retrieve("morph");}};Element.implement({morph:function(a){this.get("morph").start(a);return this;}});Fx.implement({getTransition:function(){var a=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof a=="string"){var b=a.split(":");a=Fx.Transitions;a=a[b[0]]||a[b[0].capitalize()];if(b[1]){a=a["ease"+b[1].capitalize()+(b[2]?b[2].capitalize():"")];}}return a;}});Fx.Transition=function(b,a){a=$splat(a);return $extend(b,{easeIn:function(c){return b(c,a);},easeOut:function(c){return 1-b(1-c,a);},easeInOut:function(c){return(c<=0.5)?b(2*c,a)/2:(2-b(2*(1-c),a))/2;}});};Fx.Transitions=new Hash({linear:$arguments(0)});Fx.Transitions.extend=function(a){for(var b in a){Fx.Transitions[b]=new Fx.Transition(a[b]);}};Fx.Transitions.extend({Pow:function(b,a){return Math.pow(b,a[0]||6);},Expo:function(a){return Math.pow(2,8*(a-1));},Circ:function(a){return 1-Math.sin(Math.acos(a));},Sine:function(a){return 1-Math.sin((1-a)*Math.PI/2);},Back:function(b,a){a=a[0]||1.618;return Math.pow(b,2)*((a+1)*b-a);},Bounce:function(g){var f;for(var d=0,c=1;1;d+=c,c/=2){if(g>=(7-4*d)/11){f=c*c-Math.pow((11-6*d-11*g)/4,2);break;}}return f;},Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,[a+2]);});});Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);},set:function(b,a){if(arguments.length==1){a=b;b=this.property||this.options.property;}this.render(this.element,b,a,this.options.unit);return this;},start:function(c,f,d){if(!this.check(c,f,d)){return this;}var b=Array.flatten(arguments);this.property=this.options.property||b.shift();var a=this.prepare(this.element,this.property,b);return this.parent(a.from,a.to);}});Element.Properties.tween={set:function(a){var b=this.retrieve("tween");if(b){b.cancel();}return this.eliminate("tween").store("tween:options",$extend({link:"cancel"},a));},get:function(a){if(a||!this.retrieve("tween")){if(a||!this.retrieve("tween:options")){this.set("tween",a);}this.store("tween",new Fx.Tween(this,this.retrieve("tween:options")));}return this.retrieve("tween");}};Element.implement({tween:function(a,c,b){this.get("tween").start(arguments);return this;},fade:function(c){var f=this.get("tween"),d="opacity",a;c=$pick(c,"toggle");switch(c){case"in":f.start(d,1);break;case"out":f.start(d,0);break;case"show":f.set(d,1);break;case"hide":f.set(d,0);break;case"toggle":var b=this.retrieve("fade:flag",this.get("opacity")==1);f.start(d,(b)?0:1);this.store("fade:flag",!b);a=true;break;default:f.start(d,arguments);}if(!a){this.eliminate("fade:flag");}return this;},highlight:function(c,a){if(!a){a=this.retrieve("highlight:original",this.getStyle("background-color"));a=(a=="transparent")?"#fff":a;}var b=this.get("tween");b.start("background-color",c||"#ffff88",a).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));b.callChain();}.bind(this));return this;}});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,noCache:false},initialize:function(a){this.xhr=new Browser.Request();this.setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers);},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return;}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));this.xhr.onreadystatechange=$empty;if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}},isSuccess:function(){return((this.status>=200)&&(this.status<300));},processScripts:function(a){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(a);}return a.stripScripts(this.options.evalScripts);},success:function(b,a){this.onSuccess(this.processScripts(b),a);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain();},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},setHeader:function(a,b){this.headers.set(a,b);return this;},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a);}.bind(this));},check:function(){if(!this.running){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.bind(this,arguments));return false;}return false;},send:function(l){if(!this.check(l)){return this;}this.running=true;var j=$type(l);if(j=="string"||j=="element"){l={data:l};}var d=this.options;l=$extend({data:d.data,url:d.url,method:d.method},l);var h=l.data,b=String(l.url),a=l.method.toLowerCase();switch($type(h)){case"element":h=document.id(h).toQueryString();break;case"object":case"hash":h=Hash.toQueryString(h);}if(this.options.format){var k="format="+this.options.format;h=(h)?k+"&"+h:k;}if(this.options.emulation&&!["get","post"].contains(a)){var i="_method="+a;h=(h)?i+"&"+h:i;a="post";}if(this.options.urlEncoded&&a=="post"){var c=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+c);}if(this.options.noCache){var g="noCache="+new Date().getTime();h=(h)?g+"&"+h:g;}var f=b.lastIndexOf("/");if(f>-1&&(f=b.indexOf("#"))>-1){b=b.substr(0,f);}if(h&&a=="get"){b=b+(b.contains("?")?"&":"?")+h;h=null;}this.xhr.open(a.toUpperCase(),b,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(n,m){try{this.xhr.setRequestHeader(m,n);}catch(o){this.fireEvent("exception",[m,n]);}},this);this.fireEvent("request");this.xhr.send(h);if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});(function(){var a={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(c,{method:b}));};});Request.implement(a);})();Element.Properties.send={set:function(a){var b=this.retrieve("send");if(b){b.cancel();}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},a));},get:function(a){if(a||!this.retrieve("send")){if(a||!this.retrieve("send:options")){this.set("send",a);}this.store("send",new Request(this.retrieve("send:options")));}return this.retrieve("send");}};Element.implement({send:function(a){var b=this.get("send");b.send({data:this,url:a||b.options.url});return this;}});Request.HTML=new Class({Extends:Request,options:{update:false,append:false,evalScripts:true,filter:false},processHTML:function(c){var b=c.match(/<body[^>]*>([\s\S]*?)<\/body>/i);c=(b)?b[1]:c;var a=new Element("div");return $try(function(){var d="<root>"+c+"</root>",h;if(Browser.Engine.trident){h=new ActiveXObject("Microsoft.XMLDOM");h.async=false;h.loadXML(d);}else{h=new DOMParser().parseFromString(d,"text/xml");}d=h.getElementsByTagName("root")[0];if(!d){return null;}for(var g=0,f=d.childNodes.length;g<f;g++){var j=Element.clone(d.childNodes[g],true,true);if(j){a.grab(j);}}return a;})||a.set("html",c);},success:function(d){var c=this.options,b=this.response;b.html=d.stripScripts(function(f){b.javascript=f;});var a=this.processHTML(b.html);b.tree=a.childNodes;b.elements=a.getElements("*");if(c.filter){b.tree=b.elements.filter(c.filter);}if(c.update){document.id(c.update).empty().set("html",b.html);}else{if(c.append){document.id(c.append).adopt(a.getChildren());}}if(c.evalScripts){$exec(b.javascript);}this.onSuccess(b.tree,b.elements,b.html,b.javascript);}});Element.Properties.load={set:function(a){var b=this.retrieve("load");if(b){b.cancel();}return this.eliminate("load").store("load:options",$extend({data:this,link:"cancel",update:this,method:"get"},a));},get:function(a){if(a||!this.retrieve("load")){if(a||!this.retrieve("load:options")){this.set("load",a);}this.store("load",new Request.HTML(this.retrieve("load:options")));}return this.retrieve("load");}};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Object.type,url:String.type}));return this;}});var JSON=new Hash(this.JSON&&{stringify:JSON.stringify,parse:JSON.parse}).extend({$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(a){return JSON.$specialChars[a]||"\\u00"+Math.floor(a.charCodeAt()/16).toString(16)+(a.charCodeAt()%16).toString(16);},encode:function(b){switch($type(b)){case"string":return'"'+b.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(b.map(JSON.encode).clean())+"]";case"object":case"hash":var a=[];Hash.each(b,function(f,d){var c=JSON.encode(f);if(c){a.push(JSON.encode(d)+":"+c);}});return"{"+a+"}";case"number":case"boolean":return String(b);case false:return"null";}return null;},decode:function(string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null;}return eval("("+string+")");}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);this.headers.extend({Accept:"application/json","X-Request":"JSON"});},success:function(a){this.response.json=JSON.decode(a,this.options.secure);this.onSuccess(this.response.json,a);}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(b,a){this.key=b;this.setOptions(a);},write:function(b){b=encodeURIComponent(b);if(this.options.domain){b+="; domain="+this.options.domain;}if(this.options.path){b+="; path="+this.options.path;}if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString();}if(this.options.secure){b+="; secure";}this.options.document.cookie=this.key+"="+b;return this;},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return(a)?decodeURIComponent(a[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});Cookie.write=function(b,c,a){return new Cookie(b,a).write(c);};Cookie.read=function(a){return new Cookie(a).read();};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose();};Element.Events.domready={onAdd:function(a){if(Browser.loaded){a.call(this);}}};(function(){var b=function(){if(Browser.loaded){return;}Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready");};window.addEvent("load",b);if(Browser.Engine.trident){var a=document.createElement("div");(function(){($try(function(){a.doScroll();return document.id(a).inject(document.body).set("html","temp").dispose();}))?b():arguments.callee.delay(50);})();}else{if(Browser.Engine.webkit&&Browser.Engine.version<525){(function(){(["loaded","complete"].contains(document.readyState))?b():arguments.callee.delay(50);})();}else{document.addEvent("DOMContentLoaded",b);}}})();Native.implement([Document,Element],{getElements:function(j,h){j=j.split(",");var c,f={};for(var d=0,b=j.length;d<b;d++){var a=j[d],g=Selectors.Utils.search(this,a,f);if(d!=0&&g.item){g=$A(g);}c=(d==0)?g:(c.item)?$A(c).concat(g):c.concat(g);}return new Elements(c,{ddup:(j.length>1),cash:!h});}});Element.implement({match:function(b){if(!b||(b==this)){return true;}var d=Selectors.Utils.parseTagAndID(b);var a=d[0],f=d[1];if(!Selectors.Filters.byID(this,f)||!Selectors.Filters.byTag(this,a)){return false;}var c=Selectors.Utils.parseSelector(b);return(c)?Selectors.Utils.filter(this,c,{}):true;}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)};Selectors.Utils={chk:function(b,c){if(!c){return true;}var a=$uid(b);if(!c[a]){return c[a]=true;}return false;},parseNthArgument:function(i){if(Selectors.Cache.nth[i]){return Selectors.Cache.nth[i];}var f=i.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!f){return false;}var h=parseInt(f[1],10);var d=(h||h===0)?h:1;var g=f[2]||false;var c=parseInt(f[3],10)||0;if(d!=0){c--;while(c<1){c+=d;}while(c>=d){c-=d;}}else{d=c;g="index";}switch(g){case"n":f={a:d,b:c,special:"n"};break;case"odd":f={a:2,b:0,special:"n"};break;case"even":f={a:2,b:1,special:"n"};break;case"first":f={a:0,special:"index"};break;case"last":f={special:"last-child"};break;case"only":f={special:"only-child"};break;default:f={a:(d-1),special:"index"};}return Selectors.Cache.nth[i]=f;},parseSelector:function(f){if(Selectors.Cache.parsed[f]){return Selectors.Cache.parsed[f];}var d,i={classes:[],pseudos:[],attributes:[]};while((d=Selectors.RegExps.combined.exec(f))){var j=d[1],h=d[2],g=d[3],b=d[5],c=d[6],k=d[7];if(j){i.classes.push(j);}else{if(c){var a=Selectors.Pseudo.get(c);if(a){i.pseudos.push({parser:a,argument:k});}else{i.attributes.push({name:c,operator:"=",value:k});}}else{if(h){i.attributes.push({name:h,operator:g,value:b});}}}}if(!i.classes.length){delete i.classes;}if(!i.attributes.length){delete i.attributes;}if(!i.pseudos.length){delete i.pseudos;}if(!i.classes&&!i.attributes&&!i.pseudos){i=null;}return Selectors.Cache.parsed[f]=i;},parseTagAndID:function(b){var a=b.match(Selectors.RegExps.tag);var c=b.match(Selectors.RegExps.id);return[(a)?a[1]:"*",(c)?c[1]:false];},filter:function(g,c,f){var d;if(c.classes){for(d=c.classes.length;d--;d){var h=c.classes[d];if(!Selectors.Filters.byClass(g,h)){return false;}}}if(c.attributes){for(d=c.attributes.length;d--;d){var b=c.attributes[d];if(!Selectors.Filters.byAttribute(g,b.name,b.operator,b.value)){return false;}}}if(c.pseudos){for(d=c.pseudos.length;d--;d){var a=c.pseudos[d];if(!Selectors.Filters.byPseudo(g,a.parser,a.argument,f)){return false;}}}return true;},getByTagAndID:function(b,a,d){if(d){var c=(b.getElementById)?b.getElementById(d,true):Element.getElementById(b,d,true);return(c&&Selectors.Filters.byTag(c,a))?[c]:[];}else{return b.getElementsByTagName(a);}},search:function(p,o,u){var b=[];var c=o.trim().replace(Selectors.RegExps.splitter,function(k,j,i){b.push(j);return":)"+i;}).split(":)");var q,f,B;for(var A=0,w=c.length;A<w;A++){var z=c[A];if(A==0&&Selectors.RegExps.quick.test(z)){q=p.getElementsByTagName(z);continue;}var a=b[A-1];var r=Selectors.Utils.parseTagAndID(z);var C=r[0],s=r[1];if(A==0){q=Selectors.Utils.getByTagAndID(p,C,s);}else{var d={},h=[];for(var y=0,x=q.length;y<x;y++){h=Selectors.Getters[a](h,q[y],C,s,d);}q=h;}var g=Selectors.Utils.parseSelector(z);if(g){f=[];for(var v=0,t=q.length;v<t;v++){B=q[v];if(Selectors.Utils.filter(B,g,u)){f.push(B);}}q=f;}}return q;}};Selectors.Getters={" ":function(j,h,k,a,f){var d=Selectors.Utils.getByTagAndID(h,k,a);for(var c=0,b=d.length;c<b;c++){var g=d[c];if(Selectors.Utils.chk(g,f)){j.push(g);}}return j;},">":function(j,h,k,a,g){var c=Selectors.Utils.getByTagAndID(h,k,a);for(var f=0,d=c.length;f<d;f++){var b=c[f];if(b.parentNode==h&&Selectors.Utils.chk(b,g)){j.push(b);}}return j;},"+":function(c,b,a,f,d){while((b=b.nextSibling)){if(b.nodeType==1){if(Selectors.Utils.chk(b,d)&&Selectors.Filters.byTag(b,a)&&Selectors.Filters.byID(b,f)){c.push(b);}break;}}return c;},"~":function(c,b,a,f,d){while((b=b.nextSibling)){if(b.nodeType==1){if(!Selectors.Utils.chk(b,d)){break;}if(Selectors.Filters.byTag(b,a)&&Selectors.Filters.byID(b,f)){c.push(b);}}}return c;}};Selectors.Filters={byTag:function(b,a){return(a=="*"||(b.tagName&&b.tagName.toLowerCase()==a));},byID:function(a,b){return(!b||(a.id&&a.id==b));},byClass:function(b,a){return(b.className&&b.className.contains&&b.className.contains(a," "));},byPseudo:function(a,d,c,b){return d.call(a,c,b);},byAttribute:function(c,d,b,f){var a=Element.prototype.getProperty.call(c,d);if(!a){return(b=="!=");}if(!b||f==undefined){return true;}switch(b){case"=":return(a==f);case"*=":return(a.contains(f));case"^=":return(a.substr(0,f.length)==f);case"$=":return(a.substr(a.length-f.length)==f);case"!=":return(a!=f);case"~=":return a.contains(f," ");case"|=":return a.contains(f,"-");}return false;}};Selectors.Pseudo=new Hash({checked:function(){return this.checked;},empty:function(){return !(this.innerText||this.textContent||"").length;},not:function(a){return !Element.match(this,a);},contains:function(a){return(this.innerText||this.textContent||"").contains(a);},"first-child":function(){return Selectors.Pseudo.index.call(this,0);},"last-child":function(){var a=this;while((a=a.nextSibling)){if(a.nodeType==1){return false;}}return true;},"only-child":function(){var b=this;while((b=b.previousSibling)){if(b.nodeType==1){return false;}}var a=this;while((a=a.nextSibling)){if(a.nodeType==1){return false;}}return true;},"nth-child":function(h,f){h=(h==undefined)?"n":h;var c=Selectors.Utils.parseNthArgument(h);if(c.special!="n"){return Selectors.Pseudo[c.special].call(this,c.a,f);}var g=0;f.positions=f.positions||{};var d=$uid(this);if(!f.positions[d]){var b=this;while((b=b.previousSibling)){if(b.nodeType!=1){continue;}g++;var a=f.positions[$uid(b)];if(a!=undefined){g=a+g;break;}}f.positions[d]=g;}return(f.positions[d]%c.a==c.b);},index:function(a){var b=this,c=0;while((b=b.previousSibling)){if(b.nodeType==1&&++c>a){return false;}}return(c==a);},even:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n+1",a);},odd:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n",a);},selected:function(){return this.selected;},enabled:function(){return(this.disabled===false);}});var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;},initialize:function(m,n){this.instance="Swiff_"+$time();this.setOptions(n);n=this.options;var b=this.id=n.id||this.instance;var a=document.id(n.container);Swiff.CallBacks[this.instance]={};var f=n.params,h=n.vars,g=n.callBacks;var i=$extend({height:n.height,width:n.width},n.properties);var l=this;for(var d in g){Swiff.CallBacks[this.instance][d]=(function(o){return function(){return o.apply(l.object,arguments);};})(g[d]);h[d]="Swiff.CallBacks."+this.instance+"."+d;}f.flashVars=Hash.toQueryString(h);if(Browser.Engine.trident){i.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";f.movie=m;}else{i.type="application/x-shockwave-flash";i.data=m;}var k='<object id="'+b+'"';for(var j in i){k+=" "+j+'="'+i[j]+'"';}k+=">";for(var c in f){if(f[c]){k+='<param name="'+c+'" value="'+f[c]+'" />';}}k+="</object>";this.object=((a)?a.empty():new Element("div")).set("html",k).firstChild;},replaces:function(a){a=document.id(a,true);a.parentNode.replaceChild(this.toElement(),a);return this;},inject:function(a){document.id(a,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");return eval(rs);};
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/mootools-core-1.3.1-full-nocompat-yc.js.new
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/mootools-core-1.3.1-full-nocompat-yc.js.new	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/mootools-core-1.3.1-full-nocompat-yc.js.new	(revision 10016)
@@ -0,0 +1,448 @@
+/*
+---
+MooTools: the javascript framework
+
+web build:
+ - http://mootools.net/core/7c56cfef9dddcf170a5d68e3fb61cfd7
+
+packager build:
+ - packager build Core/Core Core/Array Core/String Core/Number Core/Function Core/Object Core/Event Core/Browser Core/Class Core/Class.Extras Core/Slick.Parser Core/Slick.Finder Core/Element Core/Element.Style Core/Element.Event Core/Element.Dimensions Core/Fx Core/Fx.CSS Core/Fx.Tween Core/Fx.Morph Core/Fx.Transitions Core/Request Core/Request.HTML Core/Request.JSON Core/Cookie Core/JSON Core/DOMReady Core/Swiff
+
+copyrights:
+  - [MooTools](http://mootools.net)
+
+licenses:
+  - [MIT License](http://mootools.net/license.txt)
+...
+*/
+(function(){this.MooTools={version:"1.3.1",build:"af48c8d589f43f32212f9bb8ff68a127e6a3ba6c"};var o=this.typeOf=function(i){if(i==null){return"null";}if(i.$family){return i.$family();
+}if(i.nodeName){if(i.nodeType==1){return"element";}if(i.nodeType==3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace";}}else{if(typeof i.length=="number"){if(i.callee){return"arguments";
+}if("item" in i){return"collection";}}}return typeof i;};var j=this.instanceOf=function(t,i){if(t==null){return false;}var s=t.$constructor||t.constructor;
+while(s){if(s===i){return true;}s=s.parent;}return t instanceof i;};var f=this.Function;var p=true;for(var k in {toString:1}){p=null;}if(p){p=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
+}f.prototype.overloadSetter=function(s){var i=this;return function(u,t){if(u==null){return this;}if(s||typeof u!="string"){for(var v in u){i.call(this,v,u[v]);
+}if(p){for(var w=p.length;w--;){v=p[w];if(u.hasOwnProperty(v)){i.call(this,v,u[v]);}}}}else{i.call(this,u,t);}return this;};};f.prototype.overloadGetter=function(s){var i=this;
+return function(u){var v,t;if(s||typeof u!="string"){v=u;}else{if(arguments.length>1){v=arguments;}}if(v){t={};for(var w=0;w<v.length;w++){t[v[w]]=i.call(this,v[w]);
+}}else{t=i.call(this,u);}return t;};};f.prototype.extend=function(i,s){this[i]=s;}.overloadSetter();f.prototype.implement=function(i,s){this.prototype[i]=s;
+}.overloadSetter();var n=Array.prototype.slice;f.from=function(i){return(o(i)=="function")?i:function(){return i;};};Array.from=function(i){if(i==null){return[];
+}return(a.isEnumerable(i)&&typeof i!="string")?(o(i)=="array")?i:n.call(i):[i];};Number.from=function(s){var i=parseFloat(s);return isFinite(i)?i:null;
+};String.from=function(i){return i+"";};f.implement({hide:function(){this.$hidden=true;return this;},protect:function(){this.$protected=true;return this;
+}});var a=this.Type=function(u,t){if(u){var s=u.toLowerCase();var i=function(v){return(o(v)==s);};a["is"+u]=i;if(t!=null){t.prototype.$family=(function(){return s;
+}).hide();}}if(t==null){return null;}t.extend(this);t.$constructor=a;t.prototype.$constructor=t;return t;};var e=Object.prototype.toString;a.isEnumerable=function(i){return(i!=null&&typeof i.length=="number"&&e.call(i)!="[object Function]");
+};var q={};var r=function(i){var s=o(i.prototype);return q[s]||(q[s]=[]);};var b=function(t,x){if(x&&x.$hidden){return;}var s=r(this);for(var u=0;u<s.length;
+u++){var w=s[u];if(o(w)=="type"){b.call(w,t,x);}else{w.call(this,t,x);}}var v=this.prototype[t];if(v==null||!v.$protected){this.prototype[t]=x;}if(this[t]==null&&o(x)=="function"){m.call(this,t,function(i){return x.apply(i,n.call(arguments,1));
+});}};var m=function(i,t){if(t&&t.$hidden){return;}var s=this[i];if(s==null||!s.$protected){this[i]=t;}};a.implement({implement:b.overloadSetter(),extend:m.overloadSetter(),alias:function(i,s){b.call(this,i,this.prototype[s]);
+}.overloadSetter(),mirror:function(i){r(this).push(i);return this;}});new a("Type",a);var d=function(s,w,u){var t=(w!=Object),A=w.prototype;if(t){w=new a(s,w);
+}for(var x=0,v=u.length;x<v;x++){var B=u[x],z=w[B],y=A[B];if(z){z.protect();}if(t&&y){delete A[B];A[B]=y.protect();}}if(t){w.implement(A);}return d;};d("String",String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","quote","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase"])("Array",Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight"])("Number",Number,["toExponential","toFixed","toLocaleString","toPrecision"])("Function",f,["apply","call","bind"])("RegExp",RegExp,["exec","test"])("Object",Object,["create","defineProperty","defineProperties","keys","getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","preventExtensions","isExtensible","seal","isSealed","freeze","isFrozen"])("Date",Date,["now"]);
+Object.extend=m.overloadSetter();Date.extend("now",function(){return +(new Date);});new a("Boolean",Boolean);Number.prototype.$family=function(){return isFinite(this)?"number":"null";
+}.hide();Number.extend("random",function(s,i){return Math.floor(Math.random()*(i-s+1)+s);});var g=Object.prototype.hasOwnProperty;Object.extend("forEach",function(i,t,u){for(var s in i){if(g.call(i,s)){t.call(u,i[s],s,i);
+}}});Object.each=Object.forEach;Array.implement({forEach:function(u,v){for(var t=0,s=this.length;t<s;t++){if(t in this){u.call(v,this[t],t,this);}}},each:function(i,s){Array.forEach(this,i,s);
+return this;}});var l=function(i){switch(o(i)){case"array":return i.clone();case"object":return Object.clone(i);default:return i;}};Array.implement("clone",function(){var s=this.length,t=new Array(s);
+while(s--){t[s]=l(this[s]);}return t;});var h=function(s,i,t){switch(o(t)){case"object":if(o(s[i])=="object"){Object.merge(s[i],t);}else{s[i]=Object.clone(t);
+}break;case"array":s[i]=t.clone();break;default:s[i]=t;}return s;};Object.extend({merge:function(z,u,t){if(o(u)=="string"){return h(z,u,t);}for(var y=1,s=arguments.length;
+y<s;y++){var w=arguments[y];for(var x in w){h(z,x,w[x]);}}return z;},clone:function(i){var t={};for(var s in i){t[s]=l(i[s]);}return t;},append:function(w){for(var v=1,t=arguments.length;
+v<t;v++){var s=arguments[v]||{};for(var u in s){w[u]=s[u];}}return w;}});["Object","WhiteSpace","TextNode","Collection","Arguments"].each(function(i){new a(i);
+});var c=Date.now();String.extend("uniqueID",function(){return(c++).toString(36);});}).call(this);Array.implement({invoke:function(a){var b=Array.slice(arguments,1);
+return this.map(function(c){return c[a].apply(c,b);});},every:function(c,d){for(var b=0,a=this.length;b<a;b++){if((b in this)&&!c.call(d,this[b],b,this)){return false;
+}}return true;},filter:function(d,e){var c=[];for(var b=0,a=this.length;b<a;b++){if((b in this)&&d.call(e,this[b],b,this)){c.push(this[b]);}}return c;},clean:function(){return this.filter(function(a){return a!=null;
+});},indexOf:function(c,d){var a=this.length;for(var b=(d<0)?Math.max(0,a+d):d||0;b<a;b++){if(this[b]===c){return b;}}return -1;},map:function(d,e){var c=[];
+for(var b=0,a=this.length;b<a;b++){if(b in this){c[b]=d.call(e,this[b],b,this);}}return c;},some:function(c,d){for(var b=0,a=this.length;b<a;b++){if((b in this)&&c.call(d,this[b],b,this)){return true;
+}}return false;},associate:function(c){var d={},b=Math.min(this.length,c.length);for(var a=0;a<b;a++){d[c[a]]=this[a];}return d;},link:function(c){var a={};
+for(var e=0,b=this.length;e<b;e++){for(var d in c){if(c[d](this[e])){a[d]=this[e];delete c[d];break;}}}return a;},contains:function(a,b){return this.indexOf(a,b)!=-1;
+},append:function(a){this.push.apply(this,a);return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[Number.random(0,this.length-1)]:null;
+},include:function(a){if(!this.contains(a)){this.push(a);}return this;},combine:function(c){for(var b=0,a=c.length;b<a;b++){this.include(c[b]);}return this;
+},erase:function(b){for(var a=this.length;a--;){if(this[a]===b){this.splice(a,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var d=[];
+for(var b=0,a=this.length;b<a;b++){var c=typeOf(this[b]);if(c=="null"){continue;}d=d.concat((c=="array"||c=="collection"||c=="arguments"||instanceOf(this[b],Array))?Array.flatten(this[b]):this[b]);
+}return d;},pick:function(){for(var b=0,a=this.length;b<a;b++){if(this[b]!=null){return this[b];}}return null;},hexToRgb:function(b){if(this.length!=3){return null;
+}var a=this.map(function(c){if(c.length==1){c+=c;}return c.toInt(16);});return(b)?a:"rgb("+a+")";},rgbToHex:function(d){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!d){return"transparent";
+}var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}});String.implement({test:function(a,b){return((typeOf(a)=="regexp")?a:new RegExp(""+a,b)).test(this);
+},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim();
+},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase());
+});},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");
+},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
+return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null;},substitute:function(a,b){return this.replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1);
+}return(a[c]!=null)?a[c]:"";});}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this));},round:function(a){a=Math.pow(10,a||0).toFixed(a<0?-a:0);
+return Math.round(this*a)/a;},times:function(b,c){for(var a=0;a<this;a++){b.call(c,a,this);}},toFloat:function(){return parseFloat(this);},toInt:function(a){return parseInt(this,a||10);
+}});Number.alias("each","times");(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat(Array.from(arguments)));
+};}});Number.implement(a);})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);Function.extend({attempt:function(){for(var b=0,a=arguments.length;
+b<a;b++){try{return arguments[b]();}catch(c){}}return null;}});Function.implement({attempt:function(a,c){try{return this.apply(c,Array.from(a));}catch(b){}return null;
+},bind:function(c){var a=this,b=(arguments.length>1)?Array.slice(arguments,1):null;return function(){if(!b&&!arguments.length){return a.call(c);}if(b&&arguments.length){return a.apply(c,b.concat(Array.from(arguments)));
+}return a.apply(c,b||arguments);};},pass:function(b,c){var a=this;if(b!=null){b=Array.from(b);}return function(){return a.apply(c,b||arguments);};},delay:function(b,c,a){return setTimeout(this.pass((a==null?[]:a),c),b);
+},periodical:function(c,b,a){return setInterval(this.pass((a==null?[]:a),b),c);}});(function(){var a=Object.prototype.hasOwnProperty;Object.extend({subset:function(d,g){var f={};
+for(var e=0,b=g.length;e<b;e++){var c=g[e];f[c]=d[c];}return f;},map:function(b,e,f){var d={};for(var c in b){if(a.call(b,c)){d[c]=e.call(f,b[c],c,b);}}return d;
+},filter:function(b,d,e){var c={};Object.each(b,function(g,f){if(d.call(e,g,f,b)){c[f]=g;}});return c;},every:function(b,d,e){for(var c in b){if(a.call(b,c)&&!d.call(e,b[c],c)){return false;
+}}return true;},some:function(b,d,e){for(var c in b){if(a.call(b,c)&&d.call(e,b[c],c)){return true;}}return false;},keys:function(b){var d=[];for(var c in b){if(a.call(b,c)){d.push(c);
+}}return d;},values:function(c){var b=[];for(var d in c){if(a.call(c,d)){b.push(c[d]);}}return b;},getLength:function(b){return Object.keys(b).length;},keyOf:function(b,d){for(var c in b){if(a.call(b,c)&&b[c]===d){return c;
+}}return null;},contains:function(b,c){return Object.keyOf(b,c)!=null;},toQueryString:function(b,c){var d=[];Object.each(b,function(h,g){if(c){g=c+"["+g+"]";
+}var f;switch(typeOf(h)){case"object":f=Object.toQueryString(h,g);break;case"array":var e={};h.each(function(k,j){e[j]=k;});f=Object.toQueryString(e,g);
+break;default:f=g+"="+encodeURIComponent(h);}if(h!=null){d.push(f);}});return d.join("&");}});})();(function(){var k=this.document;var i=k.window=this;
+var b=1;this.$uid=(i.ActiveXObject)?function(e){return(e.uid||(e.uid=[b++]))[0];}:function(e){return e.uid||(e.uid=b++);};$uid(i);$uid(k);var a=navigator.userAgent.toLowerCase(),c=navigator.platform.toLowerCase(),j=a.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0],f=j[1]=="ie"&&k.documentMode;
+var o=this.Browser={extend:Function.prototype.extend,name:(j[1]=="version")?j[3]:j[1],version:f||parseFloat((j[1]=="opera"&&j[4])?j[4]:j[2]),Platform:{name:a.match(/ip(?:ad|od|hone)/)?"ios":(a.match(/(?:webos|android)/)||c.match(/mac|win|linux/)||["other"])[0]},Features:{xpath:!!(k.evaluate),air:!!(i.runtime),query:!!(k.querySelector),json:!!(i.JSON)},Plugins:{}};
+o[o.name]=true;o[o.name+parseInt(o.version,10)]=true;o.Platform[o.Platform.name]=true;o.Request=(function(){var q=function(){return new XMLHttpRequest();
+};var p=function(){return new ActiveXObject("MSXML2.XMLHTTP");};var e=function(){return new ActiveXObject("Microsoft.XMLHTTP");};return Function.attempt(function(){q();
+return q;},function(){p();return p;},function(){e();return e;});})();o.Features.xhr=!!(o.Request);var h=(Function.attempt(function(){return navigator.plugins["Shockwave Flash"].description;
+},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);o.Plugins.Flash={version:Number(h[0]||"0."+h[1])||0,build:Number(h[2])||0};
+o.exec=function(p){if(!p){return p;}if(i.execScript){i.execScript(p);}else{var e=k.createElement("script");e.setAttribute("type","text/javascript");e.text=p;
+k.head.appendChild(e);k.head.removeChild(e);}return p;};String.implement("stripScripts",function(p){var e="";var q=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(r,s){e+=s+"\n";
+return"";});if(p===true){o.exec(e);}else{if(typeOf(p)=="function"){p(e,q);}}return q;});o.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event});
+this.Window=this.$constructor=new Type("Window",function(){});this.$family=Function.from("window").hide();Window.mirror(function(e,p){i[e]=p;});this.Document=k.$constructor=new Type("Document",function(){});
+k.$family=Function.from("document").hide();Document.mirror(function(e,p){k[e]=p;});k.html=k.documentElement;k.head=k.getElementsByTagName("head")[0];if(k.execCommand){try{k.execCommand("BackgroundImageCache",false,true);
+}catch(g){}}if(this.attachEvent&&!this.addEventListener){var d=function(){this.detachEvent("onunload",d);k.head=k.html=k.window=null;};this.attachEvent("onunload",d);
+}var m=Array.from;try{m(k.html.childNodes);}catch(g){Array.from=function(p){if(typeof p!="string"&&Type.isEnumerable(p)&&typeOf(p)!="array"){var e=p.length,q=new Array(e);
+while(e--){q[e]=p[e];}return q;}return m(p);};var l=Array.prototype,n=l.slice;["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice"].each(function(e){var p=l[e];
+Array[e]=function(q){return p.apply(Array.from(q),n.call(arguments,1));};});}}).call(this);var Event=new Type("Event",function(a,i){if(!i){i=window;}var o=i.document;
+a=a||i.event;if(a.$extended){return a;}this.$extended=true;var n=a.type,k=a.target||a.srcElement,m={},c={},q=null,h,l,b,p;while(k&&k.nodeType==3){k=k.parentNode;
+}if(n.indexOf("key")!=-1){b=a.which||a.keyCode;p=Object.keyOf(Event.Keys,b);if(n=="keydown"){var d=b-111;if(d>0&&d<13){p="f"+d;}}if(!p){p=String.fromCharCode(b).toLowerCase();
+}}else{if((/click|mouse|menu/i).test(n)){o=(!o.compatMode||o.compatMode=="CSS1Compat")?o.html:o.body;m={x:(a.pageX!=null)?a.pageX:a.clientX+o.scrollLeft,y:(a.pageY!=null)?a.pageY:a.clientY+o.scrollTop};
+c={x:(a.pageX!=null)?a.pageX-i.pageXOffset:a.clientX,y:(a.pageY!=null)?a.pageY-i.pageYOffset:a.clientY};if((/DOMMouseScroll|mousewheel/).test(n)){l=(a.wheelDelta)?a.wheelDelta/120:-(a.detail||0)/3;
+}h=(a.which==3)||(a.button==2);if((/over|out/).test(n)){q=a.relatedTarget||a[(n=="mouseover"?"from":"to")+"Element"];var j=function(){while(q&&q.nodeType==3){q=q.parentNode;
+}return true;};var g=(Browser.firefox2)?j.attempt():j();q=(g)?q:null;}}else{if((/gesture|touch/i).test(n)){this.rotation=a.rotation;this.scale=a.scale;
+this.targetTouches=a.targetTouches;this.changedTouches=a.changedTouches;var f=this.touches=a.touches;if(f&&f[0]){var e=f[0];m={x:e.pageX,y:e.pageY};c={x:e.clientX,y:e.clientY};
+}}}}return Object.append(this,{event:a,type:n,page:m,client:c,rightClick:h,wheel:l,relatedTarget:document.id(q),target:document.id(k),code:b,key:p,shift:a.shiftKey,control:a.ctrlKey,alt:a.altKey,meta:a.metaKey});
+});Event.Keys={enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46};Event.implement({stop:function(){return this.stopPropagation().preventDefault();
+},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();
+}else{this.event.returnValue=false;}return this;}});(function(){var a=this.Class=new Type("Class",function(h){if(instanceOf(h,Function)){h={initialize:h};
+}var g=function(){e(this);if(g.$prototyping){return this;}this.$caller=null;var i=(this.initialize)?this.initialize.apply(this,arguments):this;this.$caller=this.caller=null;
+return i;}.extend(this).implement(h);g.$constructor=a;g.prototype.$constructor=g;g.prototype.parent=c;return g;});var c=function(){if(!this.$caller){throw new Error('The method "parent" cannot be called.');
+}var g=this.$caller.$name,h=this.$caller.$owner.parent,i=(h)?h.prototype[g]:null;if(!i){throw new Error('The method "'+g+'" has no parent.');}return i.apply(this,arguments);
+};var e=function(g){for(var h in g){var j=g[h];switch(typeOf(j)){case"object":var i=function(){};i.prototype=j;g[h]=e(new i);break;case"array":g[h]=j.clone();
+break;}}return g;};var b=function(g,h,j){if(j.$origin){j=j.$origin;}var i=function(){if(j.$protected&&this.$caller==null){throw new Error('The method "'+h+'" cannot be called.');
+}var l=this.caller,m=this.$caller;this.caller=m;this.$caller=i;var k=j.apply(this,arguments);this.$caller=m;this.caller=l;return k;}.extend({$owner:g,$origin:j,$name:h});
+return i;};var f=function(h,i,g){if(a.Mutators.hasOwnProperty(h)){i=a.Mutators[h].call(this,i);if(i==null){return this;}}if(typeOf(i)=="function"){if(i.$hidden){return this;
+}this.prototype[h]=(g)?i:b(this,h,i);}else{Object.merge(this.prototype,h,i);}return this;};var d=function(g){g.$prototyping=true;var h=new g;delete g.$prototyping;
+return h;};a.implement("implement",f.overloadSetter());a.Mutators={Extends:function(g){this.parent=g;this.prototype=d(g);},Implements:function(g){Array.from(g).each(function(j){var h=new j;
+for(var i in h){f.call(this,i,h[i],true);}},this);}};}).call(this);(function(){this.Chain=new Class({$chain:[],chain:function(){this.$chain.append(Array.flatten(arguments));
+return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();
+return this;}});var a=function(b){return b.replace(/^on([A-Z])/,function(c,d){return d.toLowerCase();});};this.Events=new Class({$events:{},addEvent:function(d,c,b){d=a(d);
+this.$events[d]=(this.$events[d]||[]).include(c);if(b){c.internal=true;}return this;},addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);}return this;
+},fireEvent:function(e,c,b){e=a(e);var d=this.$events[e];if(!d){return this;}c=Array.from(c);d.each(function(f){if(b){f.delay(b,this,c);}else{f.apply(this,c);
+}},this);return this;},removeEvent:function(e,d){e=a(e);var c=this.$events[e];if(c&&!d.internal){var b=c.indexOf(d);if(b!=-1){delete c[b];}}return this;
+},removeEvents:function(d){var e;if(typeOf(d)=="object"){for(e in d){this.removeEvent(e,d[e]);}return this;}if(d){d=a(d);}for(e in this.$events){if(d&&d!=e){continue;
+}var c=this.$events[e];for(var b=c.length;b--;){if(b in c){this.removeEvent(e,c[b]);}}}return this;}});this.Options=new Class({setOptions:function(){var b=this.options=Object.merge.apply(null,[{},this.options].append(arguments));
+if(this.addEvent){for(var c in b){if(typeOf(b[c])!="function"||!(/^on[A-Z]/).test(c)){continue;}this.addEvent(c,b[c]);delete b[c];}}return this;}});}).call(this);
+(function(){var k,n,l,g,a={},c={},m=/\\/g;var e=function(q,p){if(q==null){return null;}if(q.Slick===true){return q;}q=(""+q).replace(/^\s+|\s+$/g,"");g=!!p;
+var o=(g)?c:a;if(o[q]){return o[q];}k={Slick:true,expressions:[],raw:q,reverse:function(){return e(this.raw,true);}};n=-1;while(q!=(q=q.replace(j,b))){}k.length=k.expressions.length;
+return o[k.raw]=(g)?h(k):k;};var i=function(o){if(o==="!"){return" ";}else{if(o===" "){return"!";}else{if((/^!/).test(o)){return o.replace(/^!/,"");}else{return"!"+o;
+}}}};var h=function(u){var r=u.expressions;for(var p=0;p<r.length;p++){var t=r[p];var q={parts:[],tag:"*",combinator:i(t[0].combinator)};for(var o=0;o<t.length;
+o++){var s=t[o];if(!s.reverseCombinator){s.reverseCombinator=" ";}s.combinator=s.reverseCombinator;delete s.reverseCombinator;}t.reverse().push(q);}return u;
+};var f=function(o){return o.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(p){return"\\"+p;});};var j=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+f(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])"));
+function b(x,s,D,z,r,C,q,B,A,y,u,F,G,v,p,w){if(s||n===-1){k.expressions[++n]=[];l=-1;if(s){return"";}}if(D||z||l===-1){D=D||" ";var t=k.expressions[n];
+if(g&&t[l]){t[l].reverseCombinator=i(D);}t[++l]={combinator:D,tag:"*"};}var o=k.expressions[n][l];if(r){o.tag=r.replace(m,"");}else{if(C){o.id=C.replace(m,"");
+}else{if(q){q=q.replace(m,"");if(!o.classList){o.classList=[];}if(!o.classes){o.classes=[];}o.classList.push(q);o.classes.push({value:q,regexp:new RegExp("(^|\\s)"+f(q)+"(\\s|$)")});
+}else{if(G){w=w||p;w=w?w.replace(m,""):null;if(!o.pseudos){o.pseudos=[];}o.pseudos.push({key:G.replace(m,""),value:w,type:F.length==1?"class":"element"});
+}else{if(B){B=B.replace(m,"");u=(u||"").replace(m,"");var E,H;switch(A){case"^=":H=new RegExp("^"+f(u));break;case"$=":H=new RegExp(f(u)+"$");break;case"~=":H=new RegExp("(^|\\s)"+f(u)+"(\\s|$)");
+break;case"|=":H=new RegExp("^"+f(u)+"(-|$)");break;case"=":E=function(I){return u==I;};break;case"*=":E=function(I){return I&&I.indexOf(u)>-1;};break;
+case"!=":E=function(I){return u!=I;};break;default:E=function(I){return !!I;};}if(u==""&&(/^[*$^]=$/).test(A)){E=function(){return false;};}if(!E){E=function(I){return I&&H.test(I);
+};}if(!o.attributes){o.attributes=[];}o.attributes.push({key:B,operator:A,value:u,test:E});}}}}}return"";}var d=(this.Slick||{});d.parse=function(o){return e(o);
+};d.escapeRegExp=f;if(!this.Slick){this.Slick=d;}}).apply((typeof exports!="undefined")?exports:this);(function(){var j={},l={},b=Object.prototype.toString;
+j.isNativeCode=function(c){return(/\{\s*\[native code\]\s*\}/).test(""+c);};j.isXML=function(c){return(!!c.xmlVersion)||(!!c.xml)||(b.call(c)=="[object XMLDocument]")||(c.nodeType==9&&c.documentElement.nodeName!="HTML");
+};j.setDocument=function(w){var t=w.nodeType;if(t==9){}else{if(t){w=w.ownerDocument;}else{if(w.navigator){w=w.document;}else{return;}}}if(this.document===w){return;
+}this.document=w;var y=w.documentElement,u=this.getUIDXML(y),o=l[u],A;if(o){for(A in o){this[A]=o[A];}return;}o=l[u]={};o.root=y;o.isXMLDocument=this.isXML(w);
+o.brokenStarGEBTN=o.starSelectsClosedQSA=o.idGetsName=o.brokenMixedCaseQSA=o.brokenGEBCN=o.brokenCheckedQSA=o.brokenEmptyAttributeQSA=o.isHTMLDocument=o.nativeMatchesSelector=false;
+var m,n,x,q,r;var s,c="slick_uniqueid";var z=w.createElement("div");var p=w.body||w.getElementsByTagName("body")[0]||y;p.appendChild(z);try{z.innerHTML='<a id="'+c+'"></a>';
+o.isHTMLDocument=!!w.getElementById(c);}catch(v){}if(o.isHTMLDocument){z.style.display="none";z.appendChild(w.createComment(""));n=(z.getElementsByTagName("*").length>1);
+try{z.innerHTML="foo</foo>";s=z.getElementsByTagName("*");m=(s&&!!s.length&&s[0].nodeName.charAt(0)=="/");}catch(v){}o.brokenStarGEBTN=n||m;try{z.innerHTML='<a name="'+c+'"></a><b id="'+c+'"></b>';
+o.idGetsName=w.getElementById(c)===z.firstChild;}catch(v){}if(z.getElementsByClassName){try{z.innerHTML='<a class="f"></a><a class="b"></a>';z.getElementsByClassName("b").length;
+z.firstChild.className="b";q=(z.getElementsByClassName("b").length!=2);}catch(v){}try{z.innerHTML='<a class="a"></a><a class="f b a"></a>';x=(z.getElementsByClassName("a").length!=2);
+}catch(v){}o.brokenGEBCN=q||x;}if(z.querySelectorAll){try{z.innerHTML="foo</foo>";s=z.querySelectorAll("*");o.starSelectsClosedQSA=(s&&!!s.length&&s[0].nodeName.charAt(0)=="/");
+}catch(v){}try{z.innerHTML='<a class="MiX"></a>';o.brokenMixedCaseQSA=!z.querySelectorAll(".MiX").length;}catch(v){}try{z.innerHTML='<select><option selected="selected">a</option></select>';
+o.brokenCheckedQSA=(z.querySelectorAll(":checked").length==0);}catch(v){}try{z.innerHTML='<a class=""></a>';o.brokenEmptyAttributeQSA=(z.querySelectorAll('[class*=""]').length!=0);
+}catch(v){}}try{z.innerHTML='<form action="s"><input id="action"/></form>';r=(z.firstChild.getAttribute("action")!="s");}catch(v){}o.nativeMatchesSelector=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector;
+if(o.nativeMatchesSelector){try{o.nativeMatchesSelector.call(y,":slick");o.nativeMatchesSelector=null;}catch(v){}}}try{y.slick_expando=1;delete y.slick_expando;
+o.getUID=this.getUIDHTML;}catch(v){o.getUID=this.getUIDXML;}p.removeChild(z);z=s=p=null;o.getAttribute=(o.isHTMLDocument&&r)?function(D,B){var E=this.attributeGetters[B];
+if(E){return E.call(D);}var C=D.getAttributeNode(B);return(C)?C.nodeValue:null;}:function(C,B){var D=this.attributeGetters[B];return(D)?D.call(C):C.getAttribute(B);
+};o.hasAttribute=(y&&this.isNativeCode(y.hasAttribute))?function(C,B){return C.hasAttribute(B);}:function(C,B){C=C.getAttributeNode(B);return !!(C&&(C.specified||C.nodeValue));
+};o.contains=(y&&this.isNativeCode(y.contains))?function(B,C){return B.contains(C);}:(y&&y.compareDocumentPosition)?function(B,C){return B===C||!!(B.compareDocumentPosition(C)&16);
+}:function(B,C){if(C){do{if(C===B){return true;}}while((C=C.parentNode));}return false;};o.documentSorter=(y.compareDocumentPosition)?function(C,B){if(!C.compareDocumentPosition||!B.compareDocumentPosition){return 0;
+}return C.compareDocumentPosition(B)&4?-1:C===B?0:1;}:("sourceIndex" in y)?function(C,B){if(!C.sourceIndex||!B.sourceIndex){return 0;}return C.sourceIndex-B.sourceIndex;
+}:(w.createRange)?function(E,C){if(!E.ownerDocument||!C.ownerDocument){return 0;}var D=E.ownerDocument.createRange(),B=C.ownerDocument.createRange();D.setStart(E,0);
+D.setEnd(E,0);B.setStart(C,0);B.setEnd(C,0);return D.compareBoundaryPoints(Range.START_TO_END,B);}:null;y=null;for(A in o){this[A]=o[A];}};var e=/^([#.]?)((?:[\w-]+|\*))$/,g=/\[.+[*$^]=(?:""|'')?\]/,f={};
+j.search=function(q,D,O,v){var B=this.found=(v)?null:(O||[]);if(!q){return B;}else{if(q.navigator){q=q.document;}else{if(!q.nodeType){return B;}}}var z,N,s=this.uniques={},y=!!(O&&O.length),c=(q.nodeType==9);
+if(this.document!==(c?q:q.ownerDocument)){this.setDocument(q);}if(y){for(N=B.length;N--;){s[this.getUID(B[N])]=true;}}if(typeof D=="string"){var C=D.match(e);
+simpleSelectors:if(C){var K=C[1],V=C[2],I,G;if(!K){if(V=="*"&&this.brokenStarGEBTN){break simpleSelectors;}G=q.getElementsByTagName(V);if(v){return G[0]||null;
+}for(N=0;I=G[N++];){if(!(y&&s[this.getUID(I)])){B.push(I);}}}else{if(K=="#"){if(!this.isHTMLDocument||!c){break simpleSelectors;}I=q.getElementById(V);
+if(!I){return B;}if(this.idGetsName&&I.getAttributeNode("id").nodeValue!=V){break simpleSelectors;}if(v){return I||null;}if(!(y&&s[this.getUID(I)])){B.push(I);
+}}else{if(K=="."){if(!this.isHTMLDocument||((!q.getElementsByClassName||this.brokenGEBCN)&&q.querySelectorAll)){break simpleSelectors;}if(q.getElementsByClassName&&!this.brokenGEBCN){G=q.getElementsByClassName(V);
+if(v){return G[0]||null;}for(N=0;I=G[N++];){if(!(y&&s[this.getUID(I)])){B.push(I);}}}else{var u=new RegExp("(^|\\s)"+d.escapeRegExp(V)+"(\\s|$)");G=q.getElementsByTagName("*");
+for(N=0;I=G[N++];){className=I.className;if(!(className&&u.test(className))){continue;}if(v){return I;}if(!(y&&s[this.getUID(I)])){B.push(I);}}}}}}if(y){this.sort(B);
+}return(v)?null:B;}querySelector:if(q.querySelectorAll){if(!this.isHTMLDocument||this.brokenMixedCaseQSA||f[D]||(this.brokenCheckedQSA&&D.indexOf(":checked")>-1)||(this.brokenEmptyAttributeQSA&&g.test(D))||d.disableQSA){break querySelector;
+}var A=D;if(!c){var M=q.getAttribute("id"),p="slickid__";q.setAttribute("id",p);A="#"+p+" "+A;}try{if(v){return q.querySelector(A)||null;}else{G=q.querySelectorAll(A);
+}}catch(P){f[D]=1;break querySelector;}finally{if(!c){if(M){q.setAttribute("id",M);}else{q.removeAttribute("id");}}}if(this.starSelectsClosedQSA){for(N=0;
+I=G[N++];){if(I.nodeName>"@"&&!(y&&s[this.getUID(I)])){B.push(I);}}}else{for(N=0;I=G[N++];){if(!(y&&s[this.getUID(I)])){B.push(I);}}}if(y){this.sort(B);
+}return B;}z=this.Slick.parse(D);if(!z.length){return B;}}else{if(D==null){return B;}else{if(D.Slick){z=D;}else{if(this.contains(q.documentElement||q,D)){(B)?B.push(D):B=D;
+return B;}else{return B;}}}}this.posNTH={};this.posNTHLast={};this.posNTHType={};this.posNTHTypeLast={};this.push=(!y&&(v||(z.length==1&&z.expressions[0].length==1)))?this.pushArray:this.pushUID;
+if(B==null){B=[];}var L,H,F;var J,U,E,T,Q,x,t;var w,r,o,R,S=z.expressions;search:for(N=0;(r=S[N]);N++){for(L=0;(o=r[L]);L++){J="combinator:"+o.combinator;
+if(!this[J]){continue search;}U=(this.isXMLDocument)?o.tag:o.tag.toUpperCase();E=o.id;T=o.classList;Q=o.classes;x=o.attributes;t=o.pseudos;R=(L===(r.length-1));
+this.bitUniques={};if(R){this.uniques=s;this.found=B;}else{this.uniques={};this.found=[];}if(L===0){this[J](q,U,E,Q,x,t,T);if(v&&R&&B.length){break search;
+}}else{if(v&&R){for(H=0,F=w.length;H<F;H++){this[J](w[H],U,E,Q,x,t,T);if(B.length){break search;}}}else{for(H=0,F=w.length;H<F;H++){this[J](w[H],U,E,Q,x,t,T);
+}}}w=this.found;}}if(y||(z.expressions.length>1)){this.sort(B);}return(v)?(B[0]||null):B;};j.uidx=1;j.uidk="slick-uniqueid";j.getUIDXML=function(m){var c=m.getAttribute(this.uidk);
+if(!c){c=this.uidx++;m.setAttribute(this.uidk,c);}return c;};j.getUIDHTML=function(c){return c.uniqueNumber||(c.uniqueNumber=this.uidx++);};j.sort=function(c){if(!this.documentSorter){return c;
+}c.sort(this.documentSorter);return c;};j.cacheNTH={};j.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/;j.parseNTHArgument=function(p){var n=p.match(this.matchNTH);
+if(!n){return false;}var o=n[2]||false;var m=n[1]||1;if(m=="-"){m=-1;}var c=+n[3]||0;n=(o=="n")?{a:m,b:c}:(o=="odd")?{a:2,b:1}:(o=="even")?{a:2,b:0}:{a:0,b:m};
+return(this.cacheNTH[p]=n);};j.createNTHPseudo=function(o,m,c,n){return function(r,p){var t=this.getUID(r);if(!this[c][t]){var z=r.parentNode;if(!z){return false;
+}var q=z[o],s=1;if(n){var y=r.nodeName;do{if(q.nodeName!=y){continue;}this[c][this.getUID(q)]=s++;}while((q=q[m]));}else{do{if(q.nodeType!=1){continue;
+}this[c][this.getUID(q)]=s++;}while((q=q[m]));}}p=p||"n";var u=this.cacheNTH[p]||this.parseNTHArgument(p);if(!u){return false;}var x=u.a,w=u.b,v=this[c][t];
+if(x==0){return w==v;}if(x>0){if(v<w){return false;}}else{if(w<v){return false;}}return((v-w)%x)==0;};};j.pushArray=function(o,c,q,n,m,p){if(this.matchSelector(o,c,q,n,m,p)){this.found.push(o);
+}};j.pushUID=function(p,c,r,o,m,q){var n=this.getUID(p);if(!this.uniques[n]&&this.matchSelector(p,c,r,o,m,q)){this.uniques[n]=true;this.found.push(p);}};
+j.matchNode=function(m,n){if(this.isHTMLDocument&&this.nativeMatchesSelector){try{return this.nativeMatchesSelector.call(m,n.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g,'[$1="$2"]'));
+}catch(u){}}var t=this.Slick.parse(n);if(!t){return true;}var r=t.expressions,p,s=0,q;for(q=0;(currentExpression=r[q]);q++){if(currentExpression.length==1){var o=currentExpression[0];
+if(this.matchSelector(m,(this.isXMLDocument)?o.tag:o.tag.toUpperCase(),o.id,o.classes,o.attributes,o.pseudos)){return true;}s++;}}if(s==t.length){return false;
+}var c=this.search(this.document,t),v;for(q=0;v=c[q++];){if(v===m){return true;}}return false;};j.matchPseudo=function(p,c,o){var m="pseudo:"+c;if(this[m]){return this[m](p,o);
+}var n=this.getAttribute(p,c);return(o)?o==n:!!n;};j.matchSelector=function(n,u,c,o,p,r){if(u){var s=(this.isXMLDocument)?n.nodeName:n.nodeName.toUpperCase();
+if(u=="*"){if(s<"@"){return false;}}else{if(s!=u){return false;}}}if(c&&n.getAttribute("id")!=c){return false;}var q,m,t;if(o){for(q=o.length;q--;){t=n.getAttribute("class")||n.className;
+if(!(t&&o[q].regexp.test(t))){return false;}}}if(p){for(q=p.length;q--;){m=p[q];if(m.operator?!m.test(this.getAttribute(n,m.key)):!this.hasAttribute(n,m.key)){return false;
+}}}if(r){for(q=r.length;q--;){m=r[q];if(!this.matchPseudo(n,m.key,m.value)){return false;}}}return true;};var i={" ":function(p,v,m,q,r,t,o){var s,u,n;
+if(this.isHTMLDocument){getById:if(m){u=this.document.getElementById(m);if((!u&&p.all)||(this.idGetsName&&u&&u.getAttributeNode("id").nodeValue!=m)){n=p.all[m];
+if(!n){return;}if(!n[0]){n=[n];}for(s=0;u=n[s++];){var c=u.getAttributeNode("id");if(c&&c.nodeValue==m){this.push(u,v,null,q,r,t);break;}}return;}if(!u){if(this.contains(this.root,p)){return;
+}else{break getById;}}else{if(this.document!==p&&!this.contains(p,u)){return;}}this.push(u,v,null,q,r,t);return;}getByClass:if(q&&p.getElementsByClassName&&!this.brokenGEBCN){n=p.getElementsByClassName(o.join(" "));
+if(!(n&&n.length)){break getByClass;}for(s=0;u=n[s++];){this.push(u,v,m,null,r,t);}return;}}getByTag:{n=p.getElementsByTagName(v);if(!(n&&n.length)){break getByTag;
+}if(!this.brokenStarGEBTN){v=null;}for(s=0;u=n[s++];){this.push(u,v,m,q,r,t);}}},">":function(o,c,q,n,m,p){if((o=o.firstChild)){do{if(o.nodeType==1){this.push(o,c,q,n,m,p);
+}}while((o=o.nextSibling));}},"+":function(o,c,q,n,m,p){while((o=o.nextSibling)){if(o.nodeType==1){this.push(o,c,q,n,m,p);break;}}},"^":function(o,c,q,n,m,p){o=o.firstChild;
+if(o){if(o.nodeType==1){this.push(o,c,q,n,m,p);}else{this["combinator:+"](o,c,q,n,m,p);}}},"~":function(p,c,r,o,m,q){while((p=p.nextSibling)){if(p.nodeType!=1){continue;
+}var n=this.getUID(p);if(this.bitUniques[n]){break;}this.bitUniques[n]=true;this.push(p,c,r,o,m,q);}},"++":function(o,c,q,n,m,p){this["combinator:+"](o,c,q,n,m,p);
+this["combinator:!+"](o,c,q,n,m,p);},"~~":function(o,c,q,n,m,p){this["combinator:~"](o,c,q,n,m,p);this["combinator:!~"](o,c,q,n,m,p);},"!":function(o,c,q,n,m,p){while((o=o.parentNode)){if(o!==this.document){this.push(o,c,q,n,m,p);
+}}},"!>":function(o,c,q,n,m,p){o=o.parentNode;if(o!==this.document){this.push(o,c,q,n,m,p);}},"!+":function(o,c,q,n,m,p){while((o=o.previousSibling)){if(o.nodeType==1){this.push(o,c,q,n,m,p);
+break;}}},"!^":function(o,c,q,n,m,p){o=o.lastChild;if(o){if(o.nodeType==1){this.push(o,c,q,n,m,p);}else{this["combinator:!+"](o,c,q,n,m,p);}}},"!~":function(p,c,r,o,m,q){while((p=p.previousSibling)){if(p.nodeType!=1){continue;
+}var n=this.getUID(p);if(this.bitUniques[n]){break;}this.bitUniques[n]=true;this.push(p,c,r,o,m,q);}}};for(var h in i){j["combinator:"+h]=i[h];}var k={empty:function(c){var m=c.firstChild;
+return !(m&&m.nodeType==1)&&!(c.innerText||c.textContent||"").length;},not:function(c,m){return !this.matchNode(c,m);},contains:function(c,m){return(c.innerText||c.textContent||"").indexOf(m)>-1;
+},"first-child":function(c){while((c=c.previousSibling)){if(c.nodeType==1){return false;}}return true;},"last-child":function(c){while((c=c.nextSibling)){if(c.nodeType==1){return false;
+}}return true;},"only-child":function(n){var m=n;while((m=m.previousSibling)){if(m.nodeType==1){return false;}}var c=n;while((c=c.nextSibling)){if(c.nodeType==1){return false;
+}}return true;},"nth-child":j.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":j.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":j.createNTHPseudo("firstChild","nextSibling","posNTHType",true),"nth-last-of-type":j.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",true),index:function(m,c){return this["pseudo:nth-child"](m,""+c+1);
+},even:function(c){return this["pseudo:nth-child"](c,"2n");},odd:function(c){return this["pseudo:nth-child"](c,"2n+1");},"first-of-type":function(c){var m=c.nodeName;
+while((c=c.previousSibling)){if(c.nodeName==m){return false;}}return true;},"last-of-type":function(c){var m=c.nodeName;while((c=c.nextSibling)){if(c.nodeName==m){return false;
+}}return true;},"only-of-type":function(n){var m=n,o=n.nodeName;while((m=m.previousSibling)){if(m.nodeName==o){return false;}}var c=n;while((c=c.nextSibling)){if(c.nodeName==o){return false;
+}}return true;},enabled:function(c){return !c.disabled;},disabled:function(c){return c.disabled;},checked:function(c){return c.checked||c.selected;},focus:function(c){return this.isHTMLDocument&&this.document.activeElement===c&&(c.href||c.type||this.hasAttribute(c,"tabindex"));
+},root:function(c){return(c===this.root);},selected:function(c){return c.selected;}};for(var a in k){j["pseudo:"+a]=k[a];}j.attributeGetters={"class":function(){return this.getAttribute("class")||this.className;
+},"for":function(){return("htmlFor" in this)?this.htmlFor:this.getAttribute("for");},href:function(){return("href" in this)?this.getAttribute("href",2):this.getAttribute("href");
+},style:function(){return(this.style)?this.style.cssText:this.getAttribute("style");},tabindex:function(){var c=this.getAttributeNode("tabindex");return(c&&c.specified)?c.nodeValue:null;
+},type:function(){return this.getAttribute("type");}};var d=j.Slick=(this.Slick||{});d.version="1.1.5";d.search=function(m,n,c){return j.search(m,n,c);
+};d.find=function(c,m){return j.search(c,m,null,true);};d.contains=function(c,m){j.setDocument(c);return j.contains(c,m);};d.getAttribute=function(m,c){return j.getAttribute(m,c);
+};d.match=function(m,c){if(!(m&&c)){return false;}if(!c||c===m){return true;}j.setDocument(m);return j.matchNode(m,c);};d.defineAttributeGetter=function(c,m){j.attributeGetters[c]=m;
+return this;};d.lookupAttributeGetter=function(c){return j.attributeGetters[c];};d.definePseudo=function(c,m){j["pseudo:"+c]=function(o,n){return m.call(o,n);
+};return this;};d.lookupPseudo=function(c){var m=j["pseudo:"+c];if(m){return function(n){return m.call(this,n);};}return null;};d.override=function(m,c){j.override(m,c);
+return this;};d.isXML=j.isXML;d.uidOf=function(c){return j.getUIDHTML(c);};if(!this.Slick){this.Slick=d;}}).apply((typeof exports!="undefined")?exports:this);
+var Element=function(b,g){var h=Element.Constructors[b];if(h){return h(g);}if(typeof b!="string"){return document.id(b).set(g);}if(!g){g={};}if(!(/^[\w-]+$/).test(b)){var e=Slick.parse(b).expressions[0][0];
+b=(e.tag=="*")?"div":e.tag;if(e.id&&g.id==null){g.id=e.id;}var d=e.attributes;if(d){for(var f=0,c=d.length;f<c;f++){var a=d[f];if(a.value!=null&&a.operator=="="&&g[a.key]==null){g[a.key]=a.value;
+}}}if(e.classList&&g["class"]==null){g["class"]=e.classList.join(" ");}}return document.newElement(b,g);};if(Browser.Element){Element.prototype=Browser.Element.prototype;
+}new Type("Element",Element).mirror(function(a){if(Array.prototype[a]){return;}var b={};b[a]=function(){var h=[],e=arguments,j=true;for(var g=0,d=this.length;
+g<d;g++){var f=this[g],c=h[g]=f[a].apply(f,e);j=(j&&typeOf(c)=="element");}return(j)?new Elements(h):h;};Elements.implement(b);});if(!Browser.Element){Element.parent=Object;
+Element.Prototype={"$family":Function.from("element").hide()};Element.mirror(function(a,b){Element.Prototype[a]=b;});}Element.Constructors={};var IFrame=new Type("IFrame",function(){var e=Array.link(arguments,{properties:Type.isObject,iframe:function(f){return(f!=null);
+}});var c=e.properties||{},b;if(e.iframe){b=document.id(e.iframe);}var d=c.onload||function(){};delete c.onload;c.id=c.name=[c.id,c.name,b?(b.id||b.name):"IFrame_"+String.uniqueID()].pick();
+b=new Element(b||"iframe",c);var a=function(){d.call(b.contentWindow);};if(window.frames[c.id]){a();}else{b.addListener("load",a);}return b;});var Elements=this.Elements=function(a){if(a&&a.length){var e={},d;
+for(var c=0;d=a[c++];){var b=Slick.uidOf(d);if(!e[b]){e[b]=true;this.push(d);}}}};Elements.prototype={length:0};Elements.parent=Array;new Type("Elements",Elements).implement({filter:function(a,b){if(!a){return this;
+}return new Elements(Array.filter(this,(typeOf(a)=="string")?function(c){return c.match(a);}:a,b));}.protect(),push:function(){var d=this.length;for(var b=0,a=arguments.length;
+b<a;b++){var c=document.id(arguments[b]);if(c){this[d++]=c;}}return(this.length=d);}.protect(),unshift:function(){var b=[];for(var c=0,a=arguments.length;
+c<a;c++){var d=document.id(arguments[c]);if(d){b.push(d);}}return Array.prototype.unshift.apply(this,b);}.protect(),concat:function(){var b=new Elements(this);
+for(var c=0,a=arguments.length;c<a;c++){var d=arguments[c];if(Type.isEnumerable(d)){b.append(d);}else{b.push(d);}}return b;}.protect(),append:function(c){for(var b=0,a=c.length;
+b<a;b++){this.push(c[b]);}return this;}.protect(),empty:function(){while(this.length){delete this[--this.length];}return this;}.protect()});(function(){var g=Array.prototype.splice,b={"0":0,"1":1,length:2};
+g.call(b,1,1);if(b[1]==1){Elements.implement("splice",function(){var e=this.length;g.apply(this,arguments);while(e>=this.length){delete this[e--];}return this;
+}.protect());}Elements.implement(Array.prototype);Array.mirror(Elements);var f;try{var a=document.createElement("<input name=x>");f=(a.name=="x");}catch(c){}var d=function(e){return(""+e).replace(/&/g,"&amp;").replace(/"/g,"&quot;");
+};Document.implement({newElement:function(e,h){if(h&&h.checked!=null){h.defaultChecked=h.checked;}if(f&&h){e="<"+e;if(h.name){e+=' name="'+d(h.name)+'"';
+}if(h.type){e+=' type="'+d(h.type)+'"';}e+=">";delete h.name;delete h.type;}return this.id(this.createElement(e)).set(h);}});})();Document.implement({newTextNode:function(a){return this.createTextNode(a);
+},getDocument:function(){return this;},getWindow:function(){return this.window;},id:(function(){var a={string:function(d,c,b){d=Slick.find(b,"#"+d.replace(/(\W)/g,"\\$1"));
+return(d)?a.element(d,c):null;},element:function(b,c){$uid(b);if(!c&&!b.$family&&!(/^(?:object|embed)$/i).test(b.tagName)){Object.append(b,Element.Prototype);
+}return b;},object:function(c,d,b){if(c.toElement){return a.element(c.toElement(b),d);}return null;}};a.textnode=a.whitespace=a.window=a.document=function(b){return b;
+};return function(c,e,d){if(c&&c.$family&&c.uid){return c;}var b=typeOf(c);return(a[b])?a[b](c,e,d||document):null;};})()});if(window.$==null){Window.implement("$",function(a,b){return document.id(a,b,this.document);
+});}Window.implement({getDocument:function(){return this.document;},getWindow:function(){return this;}});[Document,Element].invoke("implement",{getElements:function(a){return Slick.search(this,a,new Elements);
+},getElement:function(a){return document.id(Slick.find(this,a));}});if(window.$$==null){Window.implement("$$",function(a){if(arguments.length==1){if(typeof a=="string"){return Slick.search(this.document,a,new Elements);
+}else{if(Type.isEnumerable(a)){return new Elements(a);}}}return new Elements(arguments);});}(function(){var k={},i={};var n={input:"checked",option:"selected",textarea:"value"};
+var e=function(p){return(i[p]||(i[p]={}));};var j=function(q){var p=q.uid;if(q.removeEvents){q.removeEvents();}if(q.clearAttributes){q.clearAttributes();
+}if(p!=null){delete k[p];delete i[p];}return q;};var o=["defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"];
+var d=["compact","nowrap","ismap","declare","noshade","checked","disabled","readOnly","multiple","selected","noresize","defer","defaultChecked"];var g={html:"innerHTML","class":"className","for":"htmlFor",text:(function(){var p=document.createElement("div");
+return(p.textContent==null)?"innerText":"textContent";})()};var m=["type"];var h=["value","defaultValue"];var l=/^(?:href|src|usemap)$/i;d=d.associate(d);
+o=o.associate(o.map(String.toLowerCase));m=m.associate(m);Object.append(g,h.associate(h));var c={before:function(q,p){var r=p.parentNode;if(r){r.insertBefore(q,p);
+}},after:function(q,p){var r=p.parentNode;if(r){r.insertBefore(q,p.nextSibling);}},bottom:function(q,p){p.appendChild(q);},top:function(q,p){p.insertBefore(q,p.firstChild);
+}};c.inside=c.bottom;var b=function(s,r){if(!s){return r;}s=Object.clone(Slick.parse(s));var q=s.expressions;for(var p=q.length;p--;){q[p][0].combinator=r;
+}return s;};Element.implement({set:function(r,q){var p=Element.Properties[r];(p&&p.set)?p.set.call(this,q):this.setProperty(r,q);}.overloadSetter(),get:function(q){var p=Element.Properties[q];
+return(p&&p.get)?p.get.apply(this):this.getProperty(q);}.overloadGetter(),erase:function(q){var p=Element.Properties[q];(p&&p.erase)?p.erase.apply(this):this.removeProperty(q);
+return this;},setProperty:function(q,r){q=o[q]||q;if(r==null){return this.removeProperty(q);}var p=g[q];(p)?this[p]=r:(d[q])?this[q]=!!r:this.setAttribute(q,""+r);
+return this;},setProperties:function(p){for(var q in p){this.setProperty(q,p[q]);}return this;},getProperty:function(q){q=o[q]||q;var p=g[q]||m[q];return(p)?this[p]:(d[q])?!!this[q]:(l.test(q)?this.getAttribute(q,2):(p=this.getAttributeNode(q))?p.nodeValue:null)||null;
+},getProperties:function(){var p=Array.from(arguments);return p.map(this.getProperty,this).associate(p);},removeProperty:function(q){q=o[q]||q;var p=g[q];
+(p)?this[p]="":(d[q])?this[q]=false:this.removeAttribute(q);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;
+},hasClass:function(p){return this.className.clean().contains(p," ");},addClass:function(p){if(!this.hasClass(p)){this.className=(this.className+" "+p).clean();
+}return this;},removeClass:function(p){this.className=this.className.replace(new RegExp("(^|\\s)"+p+"(?:\\s|$)"),"$1");return this;},toggleClass:function(p,q){if(q==null){q=!this.hasClass(p);
+}return(q)?this.addClass(p):this.removeClass(p);},adopt:function(){var s=this,p,u=Array.flatten(arguments),t=u.length;if(t>1){s=p=document.createDocumentFragment();
+}for(var r=0;r<t;r++){var q=document.id(u[r],true);if(q){s.appendChild(q);}}if(p){this.appendChild(p);}return this;},appendText:function(q,p){return this.grab(this.getDocument().newTextNode(q),p);
+},grab:function(q,p){c[p||"bottom"](document.id(q,true),this);return this;},inject:function(q,p){c[p||"bottom"](this,document.id(q,true));return this;},replaces:function(p){p=document.id(p,true);
+p.parentNode.replaceChild(this,p);return this;},wraps:function(q,p){q=document.id(q,true);return this.replaces(q).grab(q,p);},getPrevious:function(p){return document.id(Slick.find(this,b(p,"!~")));
+},getAllPrevious:function(p){return Slick.search(this,b(p,"!~"),new Elements);},getNext:function(p){return document.id(Slick.find(this,b(p,"~")));},getAllNext:function(p){return Slick.search(this,b(p,"~"),new Elements);
+},getFirst:function(p){return document.id(Slick.search(this,b(p,">"))[0]);},getLast:function(p){return document.id(Slick.search(this,b(p,">")).getLast());
+},getParent:function(p){return document.id(Slick.find(this,b(p,"!")));},getParents:function(p){return Slick.search(this,b(p,"!"),new Elements);},getSiblings:function(p){return Slick.search(this,b(p,"~~"),new Elements);
+},getChildren:function(p){return Slick.search(this,b(p,">"),new Elements);},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;
+},getElementById:function(p){return document.id(Slick.find(this,"#"+(""+p).replace(/(\W)/g,"\\$1")));},getSelected:function(){this.selectedIndex;return new Elements(Array.from(this.options).filter(function(p){return p.selected;
+}));},toQueryString:function(){var p=[];this.getElements("input, select, textarea").each(function(r){var q=r.type;if(!r.name||r.disabled||q=="submit"||q=="reset"||q=="file"||q=="image"){return;
+}var s=(r.get("tag")=="select")?r.getSelected().map(function(t){return document.id(t).get("value");}):((q=="radio"||q=="checkbox")&&!r.checked)?null:r.get("value");
+Array.from(s).each(function(t){if(typeof t!="undefined"){p.push(encodeURIComponent(r.name)+"="+encodeURIComponent(t));}});});return p.join("&");},destroy:function(){var p=j(this).getElementsByTagName("*");
+Array.each(p,j);Element.dispose(this);return null;},empty:function(){Array.from(this.childNodes).each(Element.dispose);return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;
+},match:function(p){return !p||Slick.match(this,p);}});var a=function(t,s,q){if(!q){t.setAttributeNode(document.createAttribute("id"));}if(t.clearAttributes){t.clearAttributes();
+t.mergeAttributes(s);t.removeAttribute("uid");if(t.options){var u=t.options,p=s.options;for(var r=u.length;r--;){u[r].selected=p[r].selected;}}}var v=n[s.tagName.toLowerCase()];
+if(v&&s[v]){t[v]=s[v];}};Element.implement("clone",function(r,p){r=r!==false;var w=this.cloneNode(r),q;if(r){var s=w.getElementsByTagName("*"),u=this.getElementsByTagName("*");
+for(q=s.length;q--;){a(s[q],u[q],p);}}a(w,this,p);if(Browser.ie){var t=w.getElementsByTagName("object"),v=this.getElementsByTagName("object");for(q=t.length;
+q--;){t[q].outerHTML=v[q].outerHTML;}}return document.id(w);});var f={contains:function(p){return Slick.contains(this,p);}};if(!document.contains){Document.implement(f);
+}if(!document.createElement("div").contains){Element.implement(f);}[Element,Window,Document].invoke("implement",{addListener:function(s,r){if(s=="unload"){var p=r,q=this;
+r=function(){q.removeListener("unload",r);p();};}else{k[$uid(this)]=this;}if(this.addEventListener){this.addEventListener(s,r,!!arguments[2]);}else{this.attachEvent("on"+s,r);
+}return this;},removeListener:function(q,p){if(this.removeEventListener){this.removeEventListener(q,p,!!arguments[2]);}else{this.detachEvent("on"+q,p);
+}return this;},retrieve:function(q,p){var s=e($uid(this)),r=s[q];if(p!=null&&r==null){r=s[q]=p;}return r!=null?r:null;},store:function(q,p){var r=e($uid(this));
+r[q]=p;return this;},eliminate:function(p){var q=e($uid(this));delete q[p];return this;}});if(window.attachEvent&&!window.addEventListener){window.addListener("unload",function(){Object.each(k,j);
+if(window.CollectGarbage){CollectGarbage();}});}})();Element.Properties={};Element.Properties.style={set:function(a){this.style.cssText=a;},get:function(){return this.style.cssText;
+},erase:function(){this.style.cssText="";}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};(function(a){if(a!=null){Element.Properties.maxlength=Element.Properties.maxLength={get:function(){var b=this.getAttribute("maxLength");
+return b==a?null:b;}};}})(document.createElement("input").getAttribute("maxLength"));Element.Properties.html=(function(){var c=Function.attempt(function(){var e=document.createElement("table");
+e.innerHTML="<tr><td></td></tr>";});var d=document.createElement("div");var a={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};
+a.thead=a.tfoot=a.tbody;var b={set:function(){var f=Array.flatten(arguments).join("");var g=(!c&&a[this.get("tag")]);if(g){var h=d;h.innerHTML=g[1]+f+g[2];
+for(var e=g[0];e--;){h=h.firstChild;}this.empty().adopt(h.childNodes);}else{this.innerHTML=f;}}};b.erase=b.set;return b;})();(function(){var c=document.html;
+Element.Properties.styles={set:function(f){this.setStyles(f);}};var e=(c.style.opacity!=null);var d=/alpha\(opacity=([\d.]+)\)/i;var b=function(g,f){if(!g.currentStyle||!g.currentStyle.hasLayout){g.style.zoom=1;
+}if(e){g.style.opacity=f;}else{f=(f==1)?"":"alpha(opacity="+f*100+")";var h=g.style.filter||g.getComputedStyle("filter")||"";g.style.filter=d.test(h)?h.replace(d,f):h+f;
+}};Element.Properties.opacity={set:function(g){var f=this.style.visibility;if(g==0&&f!="hidden"){this.style.visibility="hidden";}else{if(g!=0&&f!="visible"){this.style.visibility="visible";
+}}b(this,g);},get:(e)?function(){var f=this.style.opacity||this.getComputedStyle("opacity");return(f=="")?1:f;}:function(){var f,g=(this.style.filter||this.getComputedStyle("filter"));
+if(g){f=g.match(d);}return(f==null||g==null)?1:(f[1]/100);}};var a=(c.style.cssFloat==null)?"styleFloat":"cssFloat";Element.implement({getComputedStyle:function(h){if(this.currentStyle){return this.currentStyle[h.camelCase()];
+}var g=Element.getDocument(this).defaultView,f=g?g.getComputedStyle(this,null):null;return(f)?f.getPropertyValue((h==a)?"float":h.hyphenate()):null;},setOpacity:function(f){b(this,f);
+return this;},getOpacity:function(){return this.get("opacity");},setStyle:function(g,f){switch(g){case"opacity":return this.set("opacity",parseFloat(f));
+case"float":g=a;}g=g.camelCase();if(typeOf(f)!="string"){var h=(Element.Styles[g]||"@").split(" ");f=Array.from(f).map(function(k,j){if(!h[j]){return"";
+}return(typeOf(k)=="number")?h[j].replace("@",Math.round(k)):k;}).join(" ");}else{if(f==String(Number(f))){f=Math.round(f);}}this.style[g]=f;return this;
+},getStyle:function(l){switch(l){case"opacity":return this.get("opacity");case"float":l=a;}l=l.camelCase();var f=this.style[l];if(!f||l=="zIndex"){f=[];
+for(var k in Element.ShortStyles){if(l!=k){continue;}for(var j in Element.ShortStyles[k]){f.push(this.getStyle(j));}return f.join(" ");}f=this.getComputedStyle(l);
+}if(f){f=String(f);var h=f.match(/rgba?\([\d\s,]+\)/);if(h){f=f.replace(h[0],h[0].rgbToHex());}}if(Browser.opera||(Browser.ie&&isNaN(parseFloat(f)))){if((/^(height|width)$/).test(l)){var g=(l=="width")?["left","right"]:["top","bottom"],i=0;
+g.each(function(m){i+=this.getStyle("border-"+m+"-width").toInt()+this.getStyle("padding-"+m).toInt();},this);return this["offset"+l.capitalize()]-i+"px";
+}if(Browser.opera&&String(f).indexOf("px")!=-1){return f;}if((/^border(.+)Width|margin|padding/).test(l)){return"0px";}}return f;},setStyles:function(g){for(var f in g){this.setStyle(f,g[f]);
+}return this;},getStyles:function(){var f={};Array.flatten(arguments).each(function(g){f[g]=this.getStyle(g);},this);return f;}});Element.Styles={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"};
+Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(l){var k=Element.ShortStyles;
+var g=Element.Styles;["margin","padding"].each(function(m){var n=m+l;k[m][n]=g[n]="@px";});var j="border"+l;k.border[j]=g[j]="@px @ rgb(@, @, @)";var i=j+"Width",f=j+"Style",h=j+"Color";
+k[j]={};k.borderWidth[i]=k[j][i]=g[i]="@px";k.borderStyle[f]=k[j][f]=g[f]="@";k.borderColor[h]=k[j][h]=g[h]="rgb(@, @, @)";});}).call(this);(function(){Element.Properties.events={set:function(b){this.addEvents(b);
+}};[Element,Window,Document].invoke("implement",{addEvent:function(f,h){var i=this.retrieve("events",{});if(!i[f]){i[f]={keys:[],values:[]};}if(i[f].keys.contains(h)){return this;
+}i[f].keys.push(h);var g=f,b=Element.Events[f],d=h,j=this;if(b){if(b.onAdd){b.onAdd.call(this,h);}if(b.condition){d=function(k){if(b.condition.call(this,k)){return h.call(this,k);
+}return true;};}g=b.base||g;}var e=function(){return h.call(j);};var c=Element.NativeEvents[g];if(c){if(c==2){e=function(k){k=new Event(k,j.getWindow());
+if(d.call(j,k)===false){k.stop();}};}this.addListener(g,e,arguments[2]);}i[f].values.push(e);return this;},removeEvent:function(e,d){var c=this.retrieve("events");
+if(!c||!c[e]){return this;}var h=c[e];var b=h.keys.indexOf(d);if(b==-1){return this;}var g=h.values[b];delete h.keys[b];delete h.values[b];var f=Element.Events[e];
+if(f){if(f.onRemove){f.onRemove.call(this,d);}e=f.base||e;}return(Element.NativeEvents[e])?this.removeListener(e,g,arguments[2]):this;},addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);
+}return this;},removeEvents:function(b){var d;if(typeOf(b)=="object"){for(d in b){this.removeEvent(d,b[d]);}return this;}var c=this.retrieve("events");
+if(!c){return this;}if(!b){for(d in c){this.removeEvents(d);}this.eliminate("events");}else{if(c[b]){c[b].keys.each(function(e){this.removeEvent(b,e);},this);
+delete c[b];}}return this;},fireEvent:function(e,c,b){var d=this.retrieve("events");if(!d||!d[e]){return this;}c=Array.from(c);d[e].keys.each(function(f){if(b){f.delay(b,this,c);
+}else{f.apply(this,c);}},this);return this;},cloneEvents:function(e,d){e=document.id(e);var c=e.retrieve("events");if(!c){return this;}if(!d){for(var b in c){this.cloneEvents(e,b);
+}}else{if(c[d]){c[d].keys.each(function(f){this.addEvent(d,f);},this);}}return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,orientationchange:2,touchstart:2,touchmove:2,touchend:2,touchcancel:2,gesturestart:2,gesturechange:2,gestureend:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:2,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};
+var a=function(b){var c=b.relatedTarget;if(c==null){return true;}if(!c){return false;}return(c!=this&&c.prefix!="xul"&&typeOf(this)!="document"&&!this.contains(c));
+};Element.Events={mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(Browser.firefox)?"DOMMouseScroll":"mousewheel"}};
+}).call(this);(function(){var h=document.createElement("div"),e=document.createElement("div");h.style.height="0";h.appendChild(e);var d=(e.offsetParent===h);
+h=e=null;var l=function(m){return k(m,"position")!="static"||a(m);};var i=function(m){return l(m)||(/^(?:table|td|th)$/i).test(m.tagName);};Element.implement({scrollTo:function(m,n){if(a(this)){this.getWindow().scrollTo(m,n);
+}else{this.scrollLeft=m;this.scrollTop=n;}return this;},getSize:function(){if(a(this)){return this.getWindow().getSize();}return{x:this.offsetWidth,y:this.offsetHeight};
+},getScrollSize:function(){if(a(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(a(this)){return this.getWindow().getScroll();
+}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var n=this.parentNode,m={x:0,y:0};while(n&&!a(n)){m.x+=n.scrollLeft;m.y+=n.scrollTop;
+n=n.parentNode;}return m;},getOffsetParent:d?function(){var m=this;if(a(m)||k(m,"position")=="fixed"){return null;}var n=(k(m,"position")=="static")?i:l;
+while((m=m.parentNode)){if(n(m)){return m;}}return null;}:function(){var m=this;if(a(m)||k(m,"position")=="fixed"){return null;}try{return m.offsetParent;
+}catch(n){}return null;},getOffsets:function(){if(this.getBoundingClientRect&&!Browser.Platform.ios){var r=this.getBoundingClientRect(),o=document.id(this.getDocument().documentElement),q=o.getScroll(),t=this.getScrolls(),s=(k(this,"position")=="fixed");
+return{x:r.left.toInt()+t.x+((s)?0:q.x)-o.clientLeft,y:r.top.toInt()+t.y+((s)?0:q.y)-o.clientTop};}var n=this,m={x:0,y:0};if(a(this)){return m;}while(n&&!a(n)){m.x+=n.offsetLeft;
+m.y+=n.offsetTop;if(Browser.firefox){if(!c(n)){m.x+=b(n);m.y+=g(n);}var p=n.parentNode;if(p&&k(p,"overflow")!="visible"){m.x+=b(p);m.y+=g(p);}}else{if(n!=this&&Browser.safari){m.x+=b(n);
+m.y+=g(n);}}n=n.offsetParent;}if(Browser.firefox&&!c(this)){m.x-=b(this);m.y-=g(this);}return m;},getPosition:function(p){if(a(this)){return{x:0,y:0};}var q=this.getOffsets(),n=this.getScrolls();
+var m={x:q.x-n.x,y:q.y-n.y};if(p&&(p=document.id(p))){var o=p.getPosition();return{x:m.x-o.x-b(p),y:m.y-o.y-g(p)};}return m;},getCoordinates:function(o){if(a(this)){return this.getWindow().getCoordinates();
+}var m=this.getPosition(o),n=this.getSize();var p={left:m.x,top:m.y,width:n.x,height:n.y};p.right=p.left+p.width;p.bottom=p.top+p.height;return p;},computePosition:function(m){return{left:m.x-j(this,"margin-left"),top:m.y-j(this,"margin-top")};
+},setPosition:function(m){return this.setStyles(this.computePosition(m));}});[Document,Window].invoke("implement",{getSize:function(){var m=f(this);return{x:m.clientWidth,y:m.clientHeight};
+},getScroll:function(){var n=this.getWindow(),m=f(this);return{x:n.pageXOffset||m.scrollLeft,y:n.pageYOffset||m.scrollTop};},getScrollSize:function(){var o=f(this),n=this.getSize(),m=this.getDocument().body;
+return{x:Math.max(o.scrollWidth,m.scrollWidth,n.x),y:Math.max(o.scrollHeight,m.scrollHeight,n.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var m=this.getSize();
+return{top:0,left:0,bottom:m.y,right:m.x,height:m.y,width:m.x};}});var k=Element.getComputedStyle;function j(m,n){return k(m,n).toInt()||0;}function c(m){return k(m,"-moz-box-sizing")=="border-box";
+}function g(m){return j(m,"border-top-width");}function b(m){return j(m,"border-left-width");}function a(m){return(/^(?:body|html)$/i).test(m.tagName);
+}function f(m){var n=m.getDocument();return(!n.compatMode||n.compatMode=="CSS1Compat")?n.html:n.body;}}).call(this);Element.alias({position:"setPosition"});
+[Window,Document,Element].invoke("implement",{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;
+},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;
+},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;}});(function(){var f=this.Fx=new Class({Implements:[Chain,Events,Options],options:{fps:60,unit:false,duration:500,frames:null,frameSkip:true,link:"ignore"},initialize:function(g){this.subject=this.subject||this;
+this.setOptions(g);},getTransition:function(){return function(g){return -(Math.cos(Math.PI*g)-1)/2;};},step:function(g){if(this.options.frameSkip){var h=(this.time!=null)?(g-this.time):0,i=h/this.frameInterval;
+this.time=g;this.frame+=i;}else{this.frame++;}if(this.frame<this.frames){var j=this.transition(this.frame/this.frames);this.set(this.compute(this.from,this.to,j));
+}else{this.frame=this.frames;this.set(this.compute(this.from,this.to,1));this.stop();}},set:function(g){return g;},compute:function(i,h,g){return f.compute(i,h,g);
+},check:function(){if(!this.isRunning()){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.pass(arguments,this));
+return false;}return false;},start:function(k,j){if(!this.check(k,j)){return this;}this.from=k;this.to=j;this.frame=(this.options.frameSkip)?0:-1;this.time=null;
+this.transition=this.getTransition();var i=this.options.frames,h=this.options.fps,g=this.options.duration;this.duration=f.Durations[g]||g.toInt();this.frameInterval=1000/h;
+this.frames=i||Math.round(this.duration/this.frameInterval);this.fireEvent("start",this.subject);b.call(this,h);return this;},stop:function(){if(this.isRunning()){this.time=null;
+d.call(this,this.options.fps);if(this.frames==this.frame){this.fireEvent("complete",this.subject);if(!this.callChain()){this.fireEvent("chainComplete",this.subject);
+}}else{this.fireEvent("stop",this.subject);}}return this;},cancel:function(){if(this.isRunning()){this.time=null;d.call(this,this.options.fps);this.frame=this.frames;
+this.fireEvent("cancel",this.subject).clearChain();}return this;},pause:function(){if(this.isRunning()){this.time=null;d.call(this,this.options.fps);}return this;
+},resume:function(){if((this.frame<this.frames)&&!this.isRunning()){b.call(this,this.options.fps);}return this;},isRunning:function(){var g=e[this.options.fps];
+return g&&g.contains(this);}});f.compute=function(i,h,g){return(h-i)*g+i;};f.Durations={"short":250,normal:500,"long":1000};var e={},c={};var a=function(){var h=Date.now();
+for(var j=this.length;j--;){var g=this[j];if(g){g.step(h);}}};var b=function(h){var g=e[h]||(e[h]=[]);g.push(this);if(!c[h]){c[h]=a.periodical(Math.round(1000/h),g);
+}};var d=function(h){var g=e[h];if(g){g.erase(this);if(!g.length&&c[h]){delete e[h];c[h]=clearInterval(c[h]);}}};}).call(this);Fx.CSS=new Class({Extends:Fx,prepare:function(c,d,b){b=Array.from(b);
+if(b[1]==null){b[1]=b[0];b[0]=c.getStyle(d);}var a=b.map(this.parse);return{from:a[0],to:a[1]};},parse:function(a){a=Function.from(a)();a=(typeof a=="string")?a.split(" "):Array.from(a);
+return a.map(function(c){c=String(c);var b=false;Object.each(Fx.CSS.Parsers,function(f,e){if(b){return;}var d=f.parse(c);if(d||d===0){b={value:d,parser:f};
+}});b=b||{value:c,parser:Fx.CSS.Parsers.String};return b;});},compute:function(d,c,b){var a=[];(Math.min(d.length,c.length)).times(function(e){a.push({value:d[e].parser.compute(d[e].value,c[e].value,b),parser:d[e].parser});
+});a.$family=Function.from("fx:css:value");return a;},serve:function(c,b){if(typeOf(c)!="fx:css:value"){c=this.parse(c);}var a=[];c.each(function(d){a=a.concat(d.parser.serve(d.value,b));
+});return a;},render:function(a,d,c,b){a.setStyle(d,this.serve(c,b));},search:function(a){if(Fx.CSS.Cache[a]){return Fx.CSS.Cache[a];}var c={},b=new RegExp("^"+a.escapeRegExp()+"$");
+Array.each(document.styleSheets,function(f,e){var d=f.href;if(d&&d.contains("://")&&!d.contains(document.domain)){return;}var g=f.rules||f.cssRules;Array.each(g,function(k,h){if(!k.style){return;
+}var j=(k.selectorText)?k.selectorText.replace(/^\w+/,function(i){return i.toLowerCase();}):null;if(!j||!b.test(j)){return;}Object.each(Element.Styles,function(l,i){if(!k.style[i]||Element.ShortStyles[i]){return;
+}l=String(k.style[i]);c[i]=((/^rgb/).test(l))?l.rgbToHex():l;});});});return Fx.CSS.Cache[a]=c;}});Fx.CSS.Cache={};Fx.CSS.Parsers={Color:{parse:function(a){if(a.match(/^#[0-9a-f]{3,6}$/i)){return a.hexToRgb(true);
+}return((a=a.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[a[1],a[2],a[3]]:false;},compute:function(c,b,a){return c.map(function(e,d){return Math.round(Fx.compute(c[d],b[d],a));
+});},serve:function(a){return a.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(b,a){return(a)?b+a:b;}},String:{parse:Function.from(false),compute:function(b,a){return a;
+},serve:function(a){return a;}}};Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);},set:function(b,a){if(arguments.length==1){a=b;
+b=this.property||this.options.property;}this.render(this.element,b,a,this.options.unit);return this;},start:function(c,e,d){if(!this.check(c,e,d)){return this;
+}var b=Array.flatten(arguments);this.property=this.options.property||b.shift();var a=this.prepare(this.element,this.property,b);return this.parent(a.from,a.to);
+}});Element.Properties.tween={set:function(a){this.get("tween").cancel().setOptions(a);return this;},get:function(){var a=this.retrieve("tween");if(!a){a=new Fx.Tween(this,{link:"cancel"});
+this.store("tween",a);}return a;}};Element.implement({tween:function(a,c,b){this.get("tween").start(arguments);return this;},fade:function(c){var e=this.get("tween"),d="opacity",a;
+c=[c,"toggle"].pick();switch(c){case"in":e.start(d,1);break;case"out":e.start(d,0);break;case"show":e.set(d,1);break;case"hide":e.set(d,0);break;case"toggle":var b=this.retrieve("fade:flag",this.get("opacity")==1);
+e.start(d,(b)?0:1);this.store("fade:flag",!b);a=true;break;default:e.start(d,arguments);}if(!a){this.eliminate("fade:flag");}return this;},highlight:function(c,a){if(!a){a=this.retrieve("highlight:original",this.getStyle("background-color"));
+a=(a=="transparent")?"#fff":a;}var b=this.get("tween");b.start("background-color",c||"#ffff88",a).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));
+b.callChain();}.bind(this));return this;}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);
+},set:function(a){if(typeof a=="string"){a=this.search(a);}for(var b in a){this.render(this.element,b,a[b],this.options.unit);}return this;},compute:function(e,d,c){var a={};
+for(var b in e){a[b]=this.parent(e[b],d[b],c);}return a;},start:function(b){if(!this.check(b)){return this;}if(typeof b=="string"){b=this.search(b);}var e={},d={};
+for(var c in b){var a=this.prepare(this.element,c,b[c]);e[c]=a.from;d[c]=a.to;}return this.parent(e,d);}});Element.Properties.morph={set:function(a){this.get("morph").cancel().setOptions(a);
+return this;},get:function(){var a=this.retrieve("morph");if(!a){a=new Fx.Morph(this,{link:"cancel"});this.store("morph",a);}return a;}};Element.implement({morph:function(a){this.get("morph").start(a);
+return this;}});Fx.implement({getTransition:function(){var a=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof a=="string"){var b=a.split(":");
+a=Fx.Transitions;a=a[b[0]]||a[b[0].capitalize()];if(b[1]){a=a["ease"+b[1].capitalize()+(b[2]?b[2].capitalize():"")];}}return a;}});Fx.Transition=function(c,b){b=Array.from(b);
+var a=function(d){return c(d,b);};return Object.append(a,{easeIn:a,easeOut:function(d){return 1-c(1-d,b);},easeInOut:function(d){return(d<=0.5?c(2*d,b):(2-c(2*(1-d),b)))/2;
+}});};Fx.Transitions={linear:function(a){return a;}};Fx.Transitions.extend=function(a){for(var b in a){Fx.Transitions[b]=new Fx.Transition(a[b]);}};Fx.Transitions.extend({Pow:function(b,a){return Math.pow(b,a&&a[0]||6);
+},Expo:function(a){return Math.pow(2,8*(a-1));},Circ:function(a){return 1-Math.sin(Math.acos(a));},Sine:function(a){return 1-Math.cos(a*Math.PI/2);},Back:function(b,a){a=a&&a[0]||1.618;
+return Math.pow(b,2)*((a+1)*b-a);},Bounce:function(f){var e;for(var d=0,c=1;1;d+=c,c/=2){if(f>=(7-4*d)/11){e=c*c-Math.pow((11-6*d-11*f)/4,2);break;}}return e;
+},Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a&&a[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,a+2);
+});});(function(){var d=function(){},a=("onprogress" in new Browser.Request);var c=this.Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,timeout:0,noCache:false},initialize:function(e){this.xhr=new Browser.Request();
+this.setOptions(e);this.headers=this.options.headers;},onStateChange:function(){var e=this.xhr;if(e.readyState!=4||!this.running){return;}this.running=false;
+this.status=0;Function.attempt(function(){var f=e.status;this.status=(f==1223)?204:f;}.bind(this));e.onreadystatechange=d;if(a){e.onprogress=e.onloadstart=d;
+}clearTimeout(this.timer);this.response={text:this.xhr.responseText||"",xml:this.xhr.responseXML};if(this.options.isSuccess.call(this,this.status)){this.success(this.response.text,this.response.xml);
+}else{this.failure();}},isSuccess:function(){var e=this.status;return(e>=200&&e<300);},isRunning:function(){return !!this.running;},processScripts:function(e){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return Browser.exec(e);
+}return e.stripScripts(this.options.evalScripts);},success:function(f,e){this.onSuccess(this.processScripts(f),e);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain();
+},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},loadstart:function(e){this.fireEvent("loadstart",[e,this.xhr]);
+},progress:function(e){this.fireEvent("progress",[e,this.xhr]);},timeout:function(){this.fireEvent("timeout",this.xhr);},setHeader:function(e,f){this.headers[e]=f;
+return this;},getHeader:function(e){return Function.attempt(function(){return this.xhr.getResponseHeader(e);}.bind(this));},check:function(){if(!this.running){return true;
+}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.pass(arguments,this));return false;}return false;},send:function(o){if(!this.check(o)){return this;
+}this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.running=true;var l=typeOf(o);if(l=="string"||l=="element"){o={data:o};}var h=this.options;
+o=Object.append({data:h.data,url:h.url,method:h.method},o);var j=o.data,f=String(o.url),e=o.method.toLowerCase();switch(typeOf(j)){case"element":j=document.id(j).toQueryString();
+break;case"object":case"hash":j=Object.toQueryString(j);}if(this.options.format){var m="format="+this.options.format;j=(j)?m+"&"+j:m;}if(this.options.emulation&&!["get","post"].contains(e)){var k="_method="+e;
+j=(j)?k+"&"+j:k;e="post";}if(this.options.urlEncoded&&["post","put"].contains(e)){var g=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers["Content-type"]="application/x-www-form-urlencoded"+g;
+}if(!f){f=document.location.pathname;}var i=f.lastIndexOf("/");if(i>-1&&(i=f.indexOf("#"))>-1){f=f.substr(0,i);}if(this.options.noCache){f+=(f.contains("?")?"&":"?")+String.uniqueID();
+}if(j&&e=="get"){f+=(f.contains("?")?"&":"?")+j;j=null;}var n=this.xhr;if(a){n.onloadstart=this.loadstart.bind(this);n.onprogress=this.progress.bind(this);
+}n.open(e.toUpperCase(),f,this.options.async,this.options.user,this.options.password);if(this.options.user&&"withCredentials" in n){n.withCredentials=true;
+}n.onreadystatechange=this.onStateChange.bind(this);Object.each(this.headers,function(q,p){try{n.setRequestHeader(p,q);}catch(r){this.fireEvent("exception",[p,q]);
+}},this);this.fireEvent("request");n.send(j);if(!this.options.async){this.onStateChange();}if(this.options.timeout){this.timer=this.timeout.delay(this.options.timeout,this);
+}return this;},cancel:function(){if(!this.running){return this;}this.running=false;var e=this.xhr;e.abort();clearTimeout(this.timer);e.onreadystatechange=d;
+if(a){e.onprogress=e.onloadstart=d;}this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});var b={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(e){b[e]=function(g){var f={method:e};
+if(g!=null){f.data=g;}return this.send(f);};});c.implement(b);Element.Properties.send={set:function(e){var f=this.get("send").cancel();f.setOptions(e);
+return this;},get:function(){var e=this.retrieve("send");if(!e){e=new c({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")});
+this.store("send",e);}return e;}};Element.implement({send:function(e){var f=this.get("send");f.send({data:this,url:e||f.options.url});return this;}});})();
+Request.HTML=new Class({Extends:Request,options:{update:false,append:false,evalScripts:true,filter:false,headers:{Accept:"text/html, application/xml, text/xml, */*"}},success:function(e){var d=this.options,b=this.response;
+b.html=e.stripScripts(function(f){b.javascript=f;});var c=b.html.match(/<body[^>]*>([\s\S]*?)<\/body>/i);if(c){b.html=c[1];}var a=new Element("div").set("html",b.html);
+b.tree=a.childNodes;b.elements=a.getElements("*");if(d.filter){b.tree=b.elements.filter(d.filter);}if(d.update){document.id(d.update).empty().set("html",b.html);
+}else{if(d.append){document.id(d.append).adopt(a.getChildren());}}if(d.evalScripts){Browser.exec(b.javascript);}this.onSuccess(b.tree,b.elements,b.html,b.javascript);
+}});Element.Properties.load={set:function(a){var b=this.get("load").cancel();b.setOptions(a);return this;},get:function(){var a=this.retrieve("load");if(!a){a=new Request.HTML({data:this,link:"cancel",update:this,method:"get"});
+this.store("load",a);}return a;}};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Type.isObject,url:Type.isString}));
+return this;}});if(typeof JSON=="undefined"){this.JSON={};}(function(){var special={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
+var escape=function(chr){return special[chr]||"\\u"+("0000"+chr.charCodeAt(0).toString(16)).slice(-4);};JSON.validate=function(string){string=string.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");
+return(/^[\],:{}\s]*$/).test(string);};JSON.encode=JSON.stringify?function(obj){return JSON.stringify(obj);}:function(obj){if(obj&&obj.toJSON){obj=obj.toJSON();
+}switch(typeOf(obj)){case"string":return'"'+obj.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":return"["+obj.map(JSON.encode).clean()+"]";case"object":case"hash":var string=[];
+Object.each(obj,function(value,key){var json=JSON.encode(value);if(json){string.push(JSON.encode(key)+":"+json);}});return"{"+string+"}";case"number":case"boolean":return""+obj;
+case"null":return"null";}return null;};JSON.decode=function(string,secure){if(!string||typeOf(string)!="string"){return null;}if(secure||JSON.secure){if(JSON.parse){return JSON.parse(string);
+}if(!JSON.validate(string)){throw new Error("JSON could not decode the input; security is enabled and the value is not secure.");}}return eval("("+string+")");
+};}).call(this);Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);Object.append(this.headers,{Accept:"application/json","X-Request":"JSON"});
+},success:function(c){var b;try{b=this.response.json=JSON.decode(c,this.options.secure);}catch(a){this.fireEvent("error",[c,a]);return;}if(b==null){this.onFailure();
+}else{this.onSuccess(b,c);}}});var Cookie=new Class({Implements:Options,options:{path:"/",domain:false,duration:false,secure:false,document:document,encode:true},initialize:function(b,a){this.key=b;
+this.setOptions(a);},write:function(b){if(this.options.encode){b=encodeURIComponent(b);}if(this.options.domain){b+="; domain="+this.options.domain;}if(this.options.path){b+="; path="+this.options.path;
+}if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString();}if(this.options.secure){b+="; secure";
+}this.options.document.cookie=this.key+"="+b;return this;},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");
+return(a)?decodeURIComponent(a[1]):null;},dispose:function(){new Cookie(this.key,Object.merge({},this.options,{duration:-1})).write("");return this;}});
+Cookie.write=function(b,c,a){return new Cookie(b,a).write(c);};Cookie.read=function(a){return new Cookie(a).read();};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose();
+};(function(j,l){var m,g,f=[],c,b,n=true;try{n=j.frameElement!=null;}catch(i){}var h=function(){clearTimeout(b);if(m){return;}Browser.loaded=m=true;l.removeListener("DOMContentLoaded",h).removeListener("readystatechange",a);
+l.fireEvent("domready");j.fireEvent("domready");};var a=function(){for(var e=f.length;e--;){if(f[e]()){h();return true;}}return false;};var k=function(){clearTimeout(b);
+if(!a()){b=setTimeout(k,10);}};l.addListener("DOMContentLoaded",h);var d=l.createElement("div");if(d.doScroll&&!n){f.push(function(){try{d.doScroll();return true;
+}catch(o){}return false;});c=true;}if(l.readyState){f.push(function(){var e=l.readyState;return(e=="loaded"||e=="complete");});}if("onreadystatechange" in l){l.addListener("readystatechange",a);
+}else{c=true;}if(c){k();}Element.Events.domready={onAdd:function(e){if(m){e.call(this);}}};Element.Events.load={base:"load",onAdd:function(e){if(g&&this==j){e.call(this);
+}},condition:function(){if(this==j){h();delete Element.Events.load;}return true;}};j.addEvent("load",function(){g=true;});})(window,document);(function(){var Swiff=this.Swiff=new Class({Implements:Options,options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"window",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;
+},initialize:function(path,options){this.instance="Swiff_"+String.uniqueID();this.setOptions(options);options=this.options;var id=this.id=options.id||this.instance;
+var container=document.id(options.container);Swiff.CallBacks[this.instance]={};var params=options.params,vars=options.vars,callBacks=options.callBacks;
+var properties=Object.append({height:options.height,width:options.width},options.properties);var self=this;for(var callBack in callBacks){Swiff.CallBacks[this.instance][callBack]=(function(option){return function(){return option.apply(self.object,arguments);
+};})(callBacks[callBack]);vars[callBack]="Swiff.CallBacks."+this.instance+"."+callBack;}params.flashVars=Object.toQueryString(vars);if(Browser.ie){properties.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
+params.movie=path;}else{properties.type="application/x-shockwave-flash";}properties.data=path;var build='<object id="'+id+'"';for(var property in properties){build+=" "+property+'="'+properties[property]+'"';
+}build+=">";for(var param in params){if(params[param]){build+='<param name="'+param+'" value="'+params[param]+'" />';}}build+="</object>";this.object=((container)?container.empty():new Element("div")).set("html",build).firstChild;
+},replaces:function(element){element=document.id(element,true);element.parentNode.replaceChild(this.toElement(),element);return this;},inject:function(element){document.id(element,true).appendChild(this.toElement());
+return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].append(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");
+return eval(rs);};}).call(this);
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/rel_overlay.tpl
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/rel_overlay.tpl	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/rel_overlay.tpl	(revision 10016)
@@ -0,0 +1,7 @@
+{strip}
+rel="{$thumbnail.REL_OVERLAY}[{$gallery}{if isset($thumbnail.VIDEO_WIDTH)} {$thumbnail.VIDEO_WIDTH}{/if}
+{if isset($thumbnail.VIDEO_HEIGHT)} {$thumbnail.VIDEO_HEIGHT}{/if}]
+{if !empty($thumbnail.ID)};id={$thumbnail.ID}{/if}
+{if isset($thumbnail.IS_FAVORITE)};fav={$thumbnail.IS_FAVORITE}{/if}
+{if !empty($thumbnail.U_HIGH)};hdurl={$thumbnail.U_HIGH}{/if}
+"{/strip}
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/images/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/images/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/images/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/style.css
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/style.css	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/black/style.css	(revision 10016)
@@ -0,0 +1,75 @@
+/*	binaryworld themes based on		*/
+/*	mediaboxAdvanced Black theme	*/
+
+
+/**
+/*	Overlay background styling
+/*
+/**/
+
+#mbOverlay.mbOverlayFF {
+	background: transparent url(images/80.png) repeat;
+}
+
+#mbOverlay {
+	background-color: #000;
+}
+
+
+/**
+/*	Overlay panel styling	*/
+/*
+/**/
+
+#mbCenter {
+	background-color: #000;
+}
+
+#mbCenter.mbLoading {
+	background: #000 url(images/loading.gif) no-repeat center;
+}
+
+#mbImage {
+	color: #fff;
+}
+
+/**
+/*	Title, Caption and Button styling	*/
+/*
+/**/
+
+#mbBottom, #mbNumber, #mbCaption  {
+	color: #999;
+}
+
+#mbBottom a, #mbBottom a:link, #mbBottom a:visited {
+	color: #aaa;
+}
+
+#mbTitle, #mbBottom a:hover, #mbBottom a:active {
+	color: #fff;
+}
+
+
+/**
+/*	Error message styling	*/
+/*
+/**/
+
+#mbError {
+	color: #fff;
+}
+
+#mbError a, #mbError a:link, #mbError a:visited, #mbError a:hover, #mbError a:active {
+	color: #d00;
+}
+
+
+/**
+/* Shadogo
+/*
+/**/
+
+#mbBottom a.disabled-link, #mbBottom a.disabled-link:link, #mbBottom a.disabled-link:visited  {
+	color: #333;
+}
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/images/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/images/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/images/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/style.css
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/style.css	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/grey/style.css	(revision 10016)
@@ -0,0 +1,74 @@
+/*	binaryworld grey theme based on	*/
+/*	mediaboxAdvanced Black theme	*/
+
+
+/**
+/*	Overlay background styling
+/*
+/**/
+
+#mbOverlay.mbOverlayFF {
+	background: transparent url(images/80.png) repeat;
+}
+
+#mbOverlay {
+	background-color: #fff;
+}
+
+
+/**
+/*	Overlay panel styling	*/
+/*
+/**/
+
+#mbCenter {
+	background-color: #888;
+}
+
+#mbCenter.mbLoading {
+	background: #888 url(images/loading2.gif) no-repeat center;
+}
+
+#mbImage {
+	color: #000;
+}
+
+/**
+/*	Title, Caption and Button styling	*/
+/*
+/**/
+
+#mbBottom, #mbNumber, #mbCaption  {
+	color: #BBB;
+}
+
+#mbBottom a, #mbBottom a:link, #mbBottom a:visited {
+	color: #333;
+}
+
+#mbTitle, #mbBottom a:hover, #mbBottom a:active {
+	color: #BBB;
+}
+
+/**
+/*	Error message styling	*/
+/*
+/**/
+
+#mbError {
+	color: #000;
+}
+
+#mbError a, #mbError a:link, #mbError a:visited, #mbError a:hover, #mbError a:active {
+	color: #000;
+}
+
+
+/**
+/* Shadogo
+/*
+/**/
+
+#mbBottom a.disabled-link, #mbBottom a.disabled-link:link, #mbBottom a.disabled-link:visited  {
+	color: #999;
+}
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/style.css
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/style.css	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/style.css	(revision 10016)
@@ -0,0 +1,184 @@
+/*	binaryworld themes based on		*/
+/*	mediaboxAdvanced Black theme	*/
+/*	version 2.1 - August 2010		*/
+/*	for mediaboxAdvanced v.1.3.1	*/
+
+
+/**
+/*	Overlay background styling
+/*
+/**/
+
+#mbOverlay {
+	position: fixed;
+	z-index: 9998;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	cursor: pointer;
+}
+
+/**
+/*	Legacy fix for older browsers	*/
+/*
+/**/
+
+/*
+#mbOverlay.mbOverlayFF {
+	background: transparent url(black/images/80.png) repeat;
+}
+*/
+
+#mbOverlay.mbOverlayIE {
+	position: absolute;
+}
+
+/**
+/*	Overlay panel styling	*/
+/*
+/**/
+
+#mbCenter {
+	position: absolute;
+	z-index: 9999;
+	left: 50%;
+	overflow: hidden;
+	-webkit-border-radius: 10px;
+	-khtml-border-radius: 10px;
+	-moz-border-radius: 10px;
+	border-radius: 10px;
+	-webkit-box-shadow: 0px 5px 20px rgba(0,0,0,0.50);
+	-khtml-box-shadow: 0px 5px 20px rgba(0,0,0,0.50);
+	-moz-box-shadow: 0px 5px 20px rgba(0,0,0,0.50);
+	box-shadow: 0px 5px 20px rgba(0,0,0,0.50);
+	/* For IE 8 */
+	-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=180, Color='#000000')";
+	/* For IE 5.5 - 7 */
+	filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=180, Color='#000000');
+}
+
+#mbCenter.mbLoading {
+	/*background: #000 url(black/images/loading.gif) no-repeat center;*/
+		/*	This style is applied only during animation.	*/
+		/*	For example, the next lines turn off shadows	*/
+		/*	improving browser performance on slow systems.	*/
+		/*	To leave shadows on, just remove the following:	*/
+	-webkit-box-shadow: none;
+	-khtml-box-shadow: none;
+	-moz-box-shadow: none;
+	box-shadow: none;
+}
+
+#mbImage {
+	position: relative;
+	left: 0;
+	top: 0;
+
+	/*	Inline content styling	*/
+
+	font-family: Myriad, Verdana, Arial, Helvetica, sans-serif;
+	line-height: 20px;
+	font-size: 12px;
+	text-align: left;
+	background-position: center center;
+	background-repeat: no-repeat;
+	padding: 10px;
+}
+
+/**
+/*	Title, Caption and Button styling	*/
+/*
+/**/
+
+#mbBottom {
+	min-height: 20px;
+	font-family: Myriad, Verdana, Arial, Helvetica, sans-serif;
+	line-height: 20px;
+	font-size: 12px;
+	text-align: left;
+	padding: 0 10px 10px;
+}
+
+#mbTitle, #mbPrevLink, #mbNextLink, #mbCloseLink {
+	display: inline;
+	font-weight: bold;
+	line-height: 20px;
+	font-size: 12px;
+}
+
+#mbNumber {
+	display: inline;
+	/*color: #999;*/
+	line-height: 14px;
+	font-size: 10px;
+	margin: auto 10px;
+}
+
+#mbCaption {
+	display: block;
+	/*color: #999;*/
+	line-height: 14px;
+	font-size: 10px;
+}
+
+#mbBottom a {
+	float: right;
+	outline: none;
+	margin: 0 0 0 10px;
+	font-weight: normal;
+	border-width: 0px;
+	text-decoration: none;
+}
+
+#mbBottom a b {
+	font-weight: bold;
+	text-decoration: underline;
+}
+
+#mbBottom a big {
+	font-size: 16px;
+	line-height: 14px;
+	font-weight: bold;
+}
+
+#mbBottom a:link, #mbBottom a:visited,
+#mbBottom a:hover, #mbBottom a:active {
+	text-decoration: none;
+}
+
+
+/**
+/*	Error message styling	*/
+/*
+/**/
+
+#mbError {
+	position: relative;
+	font-family: Myriad, Verdana, Arial, Helvetica, sans-serif;
+	line-height: 20px;
+	font-size: 12px;
+	text-align: center;
+	border: 10px solid #700;
+	padding: 10px 10px 10px;
+	margin: 20px;
+	-webkit-border-radius: 5px;
+	-khtml-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;
+}
+
+#mbError a, #mbError a:link, #mbError a:visited, #mbError a:hover, #mbError a:active {
+	font-weight: bold;
+	text-decoration: underline;
+}
+
+/**
+/* Shadogo
+/*
+/**/
+
+#mbBottom a.disabled-link, #mbBottom a.disabled-link:link, #mbBottom a.disabled-link:visited  {
+	font-weight: normal;
+	font-style: oblique;
+}
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/images/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/images/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/images/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/index.php
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwishadow - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/style.css
===================================================================
--- extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/style.css	(revision 10016)
+++ extensions/Shadogo/trunk/libs/mediaboxAdvanced/themes/white/style.css	(revision 10016)
@@ -0,0 +1,76 @@
+/*	binaryworld white theme based on	*/
+/*	mediaboxAdvanced Black theme		*/
+
+
+
+/**
+/*	Overlay background styling
+/*
+/**/
+
+#mbOverlay.mbOverlayFF {
+	background: transparent url(images/80.png) repeat;
+}
+
+#mbOverlay {
+	background-color: #fff;
+}
+
+
+/**
+/*	Overlay panel styling	*/
+/*
+/**/
+
+#mbCenter {
+	background-color: #fff;
+}
+
+#mbCenter.mbLoading {
+	background: #fff url(images/loading3.gif) no-repeat center;
+}
+
+#mbImage {
+	color: #000;
+}
+
+/**
+/*	Title, Caption and Button styling	*/
+/*
+/**/
+
+#mbBottom, #mbNumber, #mbCaption  {
+	color: #999;
+}
+
+
+#mbBottom a, #mbBottom a:link, #mbBottom a:visited {
+	color: #666;
+}
+
+#mbTitle, #mbBottom a:hover, #mbBottom a:active {
+	color: #000;
+}
+
+/**
+/*	Error message styling	*/
+/*
+/**/
+
+#mbError {
+	color: #000;
+}
+
+#mbError a, #mbError a:link, #mbError a:visited, #mbError a:hover, #mbError a:active {
+	color: #d00;
+}
+
+
+/**
+/* Shadogo
+/*
+/**/
+
+#mbBottom a.disabled-link, #mbBottom a.disabled-link:link, #mbBottom a.disabled-link:visited  {
+	color: #999;
+}
Index: extensions/Shadogo/trunk/libs/shadowbox/A_LIRE.txt
===================================================================
--- extensions/Shadogo/trunk/libs/shadowbox/A_LIRE.txt	(revision 10016)
+++ extensions/Shadogo/trunk/libs/shadowbox/A_LIRE.txt	(revision 10016)
@@ -0,0 +1,12 @@
+Installation de Shadowbox
+-------------------------
+
+1) Pour pouvoir utiliser shadowbox il faut télécharger la librairie sur le site officiel.
+http://www.shadowbox-js.com/download.html
+Choisir l'adapter Base(standalone)
+
+2) Extraire les fichiers de l'archive téléchargée dans ce répertoire.
+
+3) Pour activer l'utilisation de la librairie, il faut changer la configuration du plugin dans la console d'administration de Piwigo.
+Si les fichiers de shadowbox sont correctement installés, 'shadowbox' sera affiché dans la liste des déroulante des librairies pouvant être utilisées.
+Selectionner 'shadowbox' et cliquer sur le bouton 'Enregistrer'
Index: extensions/Shadogo/trunk/libs/shadowbox/README
===================================================================
--- extensions/Shadogo/trunk/libs/shadowbox/README	(revision 10016)
+++ extensions/Shadogo/trunk/libs/shadowbox/README	(revision 10016)
@@ -0,0 +1,73 @@
+Overview
+--------
+
+Shadowbox is a flexible media viewer that supports all of the web's most popular
+media publishing formats. Shadowbox is written entirely in JavaScript and CSS and
+is highly customizable. Using Shadowbox, website authors can display a wide
+assortment of media in all major browsers without navigating users away from the
+linking page.
+
+For more information, please see http://shadowbox-js.com/.
+
+Installation and Usage
+----------------------
+
+For detailed installation and usage instructions, please see the usage page at
+http://shadowbox-js.com/usage.html.
+
+How to Build
+------------
+
+IMPORTANT: The following instructions are for those who would like to create a custom build
+of Shadowbox on their own machines. Most users will not want to do this and instead should
+simply download, install, and use Shadowbox as described on the Shadowbox website at
+http://shadowbox-js.com/usage.html.
+
+In order to build Shadowbox on your own machine you must have the Ruby programming
+language (http://ruby-lang.org/) installed as well as the Rake build tool
+(http://rake.rubyforge.org/). Simply edit the parameters in `build.yml` to your liking
+and run the following command from the project root directory:
+
+    $ rake
+
+Note: If you want to build a compressed version of the code (which is the default), you
+will also need Java installed. You can always use the web interface on the Shadowbox website
+(http://shadowbox-js.com/download.html) to build your own version of the code if you are
+unable to do it on your own.
+
+How to Run Tests and Examples
+-----------------------------
+
+The Shadowbox test suite is written with QUnit (http://github.com/jquery/qunit). To run the
+tests, you first need to build the code using the `build:tests` Rake task.
+
+    $ rake build:tests
+
+Once you have built the code, open `tests/index.html` in your browser of choice. Likewise,
+to run any of the examples you first need to run the `build:examples` Rake task before
+opening the example HTML file in your browser.
+
+    $ rake build:examples
+
+How to Contribute
+-----------------
+
+If you would like to contribute to the project please email me your contribution/patch
+at mjijackson@gmail.com. I'm more than happy to accomodate fixes and modifications that
+make Shadowbox a better product.
+
+Bugs
+----
+
+Please report any bugs that you may find at http://github.com/mjijackson/shadowbox/issues.
+
+License
+-------
+
+The Shadowbox license is available online at http://shadowbox-js.com/LICENSE.
+
+Credits
+-------
+
+Shadowbox employs several open source libraries including Sizzle.js (http://sizzlejs.com/)
+and swfobject (http://code.google.com/p/swfobject/).
Index: extensions/Shadogo/trunk/libs/shadowbox/rel_overlay.tpl
===================================================================
--- extensions/Shadogo/trunk/libs/shadowbox/rel_overlay.tpl	(revision 10016)
+++ extensions/Shadogo/trunk/libs/shadowbox/rel_overlay.tpl	(revision 10016)
@@ -0,0 +1,6 @@
+{strip}
+rel="{$thumbnail.REL_OVERLAY}[{$gallery}]
+{if !empty($thumbnail.VIDEO_WIDTH)};width={$thumbnail.VIDEO_WIDTH}{/if}
+{if !empty($thumbnail.VIDEO_HEIGHT)};height={$thumbnail.VIDEO_HEIGHT}{/if}
+{if isset($thumbnail.MEDIA) && $thumbnail.MEDIA != "swf"};player=flv;{literal}options={flashVars:{type:\'video\'}}{/literal}{/if}
+"{/strip}
Index: extensions/Shadogo/trunk/main.inc.php
===================================================================
--- extensions/Shadogo/trunk/main.inc.php	(revision 10016)
+++ extensions/Shadogo/trunk/main.inc.php	(revision 10016)
@@ -0,0 +1,300 @@
+<?php
+/*
+Plugin Name: Shadogo
+Version: 0.1.10
+Description: Display pictures, videos and piwigo pages in modal overlay window.
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=521
+Author: Binaryworld
+Author URI: http://binaryworld.hd.free.fr/
+*/
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+define('SHADOGO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+if (!defined( 'DS')) define( 'DS', DIRECTORY_SEPARATOR );
+load_language('plugin.lang', SHADOGO_PATH);
+
+include_once SHADOGO_PATH .'overlaylibs.inc.php';
+include_once SHADOGO_PATH .'config.inc.php';
+
+class Shadogo {
+
+	public static $PLUGIN_ID = NULL;
+	private static $_instance = NULL;
+	
+	private $_config;
+	private $_pluginPath;
+	private $_pluginURL;
+	private $_overlayLibs = array();
+
+    /**
+     * Prevent direct object creation
+     */
+    final private function  __construct() { }
+
+    /**
+     * Prevent object cloning
+     */
+    final private function  __clone() { }
+
+    final public static function getInstance($pluginId){
+        if(null !== self::$_instance){
+            return self::$_instance;
+        }
+        $oldInstance = get_plugin_data($pluginId);
+        
+        self::$_instance = new Shadogo();
+		self::$PLUGIN_ID = $pluginId;
+		//self::$_instance->loadConfig();
+		set_plugin_data(self::$PLUGIN_ID, self::$_instance);
+        return self::$_instance;
+    }	
+
+	
+	public function getPluginPath() {
+		if ( !isset($this->_pluginPath) ) $this->_pluginPath = dirname(__FILE__);
+		return $this->_pluginPath;
+	}
+	public function getPluginURL() {
+		if ( !isset($this->_pluginURL) ) $this->_pluginURL =  get_root_url() .'plugins/'. basename(dirname(__FILE__));
+		return $this->_pluginURL;
+	}
+	
+	public function &getConfig() {
+		global $conf;
+		if (isset($this->_config)) return $this->_config;
+		// the config is initialized in DB during the plugin installation
+		if (isset( $conf[ShadogoConfig::$CONFIG_NAME])) {
+			$this->_config = new ShadogoConfig();
+			return $this->_config;
+		}
+		// !! Not possible if the plugin is well installed
+		$this->_config = $this->getDefaultConfig();
+		return $this->_config;
+	}
+	public function getDefaultConfig() {
+		$c = ShadogoConfig::createDefaultConfiguration();
+		return new ShadogoConfig($c); 
+	}
+
+    //
+    // Modal overlay lib
+    //
+    public function getOverlayLib($libName = null) {
+    	if (empty($libName)) {
+    		$libName = $this->getConfig()->modalOverlayLib;
+    	}
+    	
+    	if ( !empty( $this->_overlayLibs[$libName] )) {
+			return	$this->_overlayLibs[$libName];		
+    	}
+    	$this->_overlayLibs[$libName] = ModalOverlayLibFactory::createModalOverlayLib($libName);
+    	return $this->_overlayLibs[$libName];
+    }
+
+    public function getInstalledOverlayLibs() {
+    	return ModalOverlayLibFactory::getInstalledOverlayLibs();
+    }
+
+    
+	//
+	// Admin
+	//
+	public function onAdminMenu($menu) {
+        array_push($menu,
+            array(
+                'NAME' => 'Shadogo',
+                'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/shadogo_admin.php')
+            )
+        );
+        return $menu;
+		
+	}
+
+	//
+	// Site Event Management
+	//
+	
+	public function onBeginPicture() {
+		global $template;
+		if ($this->getConfig()->hdPictureInOverlay === true) {
+			$template->set_prefilter('default_content', 'shadogo_pictureprefilter');
+		}
+		if ($this->getConfig()->slideshowInOverlay === true) {
+			$template->set_prefilter('picture', 'shadogo_slideshowprefilter');
+			$template->set_prefilter('slideshow', 'shadogo_closeslideshowprefilter');
+		}
+	}
+	
+	public function onBeginIndex() {
+		global $template;
+		$test = $this->getConfig();
+		
+		if ($this->getConfig()->thumbInOverlay === true) {
+			$template->set_prefilter('index_thumbnails', 'shadogo_thumbprefilter');
+		}
+		if ($this->getConfig()->slideshowInOverlay === true) { 
+			$template->set_prefilter('index', 'shadogo_slideshowprefilter');
+			$template->set_prefilter('slideshow', 'shadogo_closeslideshowprefilter');
+		}
+	}
+	
+	protected function assignPluginTemplateVars($template) {
+		$c = $this->getConfig();
+		$template->assign(ShadogoConfig::$CONFIG_NAME, array(
+			'thumbMediaPlayerIcon' => $c->thumbMediaPlayerIcon,
+			'thumbContentIcon' => $c->thumbContentIcon,
+			'thumbContentLabel' => $c->thumbContentLabel,
+			'thumbContentInOverlay' => $c->thumbContentInOverlay,
+			'overlayLibName' => $c->modalOverlayLib,
+			'overlayLibPath' => ModalOverlayLibFactory::getOverlayLibPath($c->modalOverlayLib) .DS,
+			'pluginPath' => $this->getPluginPath(),
+			'pluginUrl' => $this->getPluginUrl()
+		));
+		
+	}
+	
+	protected function addVideoContentTemplateVars(&$tpl_var, $matches) {
+		global $picture;
+		// Add shadogo plugin paramters
+		$tpl_var['U_PLAYER'] = $this->getOverlayLib()->getPlayerUrl();
+		// TODO: add lib configruation tab in the plugin administration console
+		$tpl_var['FLASH_VARS'] = $this->getOverlayLib()->getFlashVarsTemplate();
+		
+		// Add media parameters
+		if (!empty($matches['path']) && !empty($matches['file']) && !empty($matches['media'])) {
+			if (isset($tpl_var['NAME'])) $tpl_var['NAME'] = str_replace('_', ' ', $matches['file']);
+			$tpl_var['MEDIA'] = strtolower($matches['media']);
+			$filePath = ltrim($matches['path'], './');
+			$tpl_var['VIDEO_URL'] = get_absolute_root_url(false) . $filePath .'/'. $matches['file'] .'.'. $matches['media'];
+			if (!empty($matches['width'])) $tpl_var['VIDEO_WIDTH'] = $matches['width'];
+			if (!empty($matches['height'])) $tpl_var['VIDEO_HEIGHT'] = $matches['height'];
+		}
+	}
+	
+	public function onEndIndexThumbnails($tpl_thumbnails_var) {
+		global $template, $user;
+		
+		$pattern = $this->getConfig()->mediaFilePattern;
+		if (!empty($pattern)) {
+			$favorites;
+			if (!is_a_guest() and $this->getConfig()->get('favoritePicture')) {
+				// Get the user favorite pictures
+				$query = 'SELECT image_id AS iid FROM '.FAVORITES_TABLE.' WHERE user_id = '.$user['id'].';';
+				$favorites = array_from_query( $query, 'iid');
+			}
+			
+			$nbrElements = count($tpl_thumbnails_var);
+			for ($i = 0; $i < $nbrElements; $i++) {
+				if (preg_match($pattern, $tpl_thumbnails_var[$i]['FILE_PATH'],$matches)) {
+					$this->addVideoContentTemplateVars($tpl_thumbnails_var[$i], $matches);
+					$tpl_thumbnails_var[$i]['U_OVERLAY'] = $tpl_thumbnails_var[$i]['VIDEO_URL'];
+				} else { 
+					$tpl_thumbnails_var[$i]['U_OVERLAY'] = $tpl_thumbnails_var[$i]['FILE_PATH'];
+					if ($tpl_thumbnails_var[$i]['FILE_HAS_HD'] === true) {
+						$pi = pathinfo($tpl_thumbnails_var[$i]['FILE_PATH']);
+						$tpl_thumbnails_var[$i]['U_HIGH'] = $pi['dirname'].'/pwg_high/'.$pi['basename'];
+					}
+				}
+				$tpl_thumbnails_var[$i]['REL_OVERLAY'] = $this->getOverlayLib()->getDefaultLinkRelationship();
+				if (isset($favorites)) {
+					$tpl_thumbnails_var[$i]['IS_FAVORITE'] = (int) in_array($tpl_thumbnails_var[$i]['ID'], $favorites);
+				}
+			}
+				
+			$this->assignPluginTemplateVars($template);
+			return $tpl_thumbnails_var;
+		}
+	}
+	
+	public function onRenderElementContent($content, $element_info) {
+		global $page;
+		$pattern = $this->getConfig()->mediaFilePattern;
+		// Do not display video player in the slideshow
+		if (!empty($pattern) && !$page['slideshow']) {
+			if (preg_match($pattern, $element_info['image_url'], $matches)) {
+				global $page, $template;
+				$template->set_template_dir('./plugins/'. basename(dirname(__FILE__)) .'/template');
+				$template->set_filenames(
+					array('default_content'=>'video_content.tpl')
+				);
+				$params = array(
+			      'SRC_IMG' => $element_info['image_url'],
+			      'ALT_IMG' => $element_info['file'],
+			      'WIDTH_IMG' => @$element_info['scaled_width'],
+			      'HEIGHT_IMG' => @$element_info['scaled_height'],
+				);
+				$this->addVideoContentTemplateVars($params, $matches);
+				$params['REL_OVERLAY'] = $this->getOverlayLib()->getDefaultLinkRelationship();
+				$template->assign( $params );
+				return $template->parse( 'default_content', true);
+			}	
+		}
+		return $content;
+	}
+	
+	public function onAppendHeader() {
+		global $template;
+		$css = '<link rel="stylesheet" href="'. $this->getPluginURL() .'/shadogo.css" type="text/css" media="screen" />';
+		$template->append('head_elements', $css);
+		$this->getOverlayLib()->appendHeaderContent($template, 'head_elements', $this->getConfig());
+	}
+} // End class	
+
+$obj = Shadogo::getInstance($plugin['id']);
+
+
+// Event admin
+add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'onAdminMenu') );
+
+// Event site
+add_event_handler('loc_end_page_header', array(&$obj, 'onAppendHeader'));
+add_event_handler('loc_begin_picture', array(&$obj, 'onBeginPicture'));
+add_event_handler('loc_begin_index', array(&$obj, 'onBeginIndex'));
+add_event_handler('loc_end_index_thumbnails', array(&$obj, 'onEndIndexThumbnails'));
+if ($obj->getConfig()->displayMediaPlayer === true) {
+	// add event handler for rendering element content EVENT_HANDLER_PRIORITY_NEUTRAL - 1 in order to be triggerd before the default handler
+	add_event_handler('render_element_content', array(&$obj, 'onRenderElementContent'), EVENT_HANDLER_PRIORITY_NEUTRAL - 1, 2);
+}
+
+function shadogo_pictureprefilter($content, &$smarty) {
+	$obj = get_plugin_data(Shadogo::$PLUGIN_ID);
+	$c = $obj->getConfig();
+	return preg_replace($c->hdPicturePrefilterPattern, $c->hdPicturePrefilterReplacement, $content);
+}
+function shadogo_slideshowprefilter($content, &$smarty) {
+	$obj = get_plugin_data(Shadogo::$PLUGIN_ID);
+	$c = $obj->getConfig();
+	return preg_replace($c->slideshowPrefilterPattern, $c->slideshowPrefilterReplacement, $content);
+}
+function shadogo_closeslideshowprefilter($content, &$smarty) {
+	$obj = get_plugin_data(Shadogo::$PLUGIN_ID);
+	$c = $obj->getConfig();
+	return preg_replace($c->slideshowClosePattern, $c->slideshowCloseReplacement, $content);
+}
+// Prefilter for thumbnail
+function shadogo_thumbprefilter($content, &$smarty) {
+	static $thumbButtonsTemplate, $thumbContentTemplate;
+	$obj = get_plugin_data(Shadogo::$PLUGIN_ID);
+	$c = $obj->getConfig();
+
+	if ($c->thumbInOverlay === true ) {
+	
+		if (empty($thumbContentTemplate)) {
+			$thumbContentTemplate = file_get_contents( $obj->getPluginPath() .DS. 'template' .DS. 'thumbnail_shadogo_content.tpl' );
+		}
+		// replace all occurences
+		$content = str_replace($c->thumbHrefContentSearch, $thumbContentTemplate, $content);
+	}
+		
+	if ($c->thumbMediaPlayerIcon === true || $c->thumbContentIcon === true) {
+
+		if (empty($thumbButtonsTemplate)) {
+			$thumbButtonsTemplate = file_get_contents( $obj->getPluginPath() .DS. 'template' .DS. 'thumbnail_shadogo_buttons.tpl' );
+		}
+		
+		$count = 1; // replace only the first occurence
+		$content = str_replace($c->thumbButtonsTemplateSearch, $thumbButtonsTemplate, $content, $count);
+	}
+	return $content;
+}
+
+?>
Index: extensions/Shadogo/trunk/maintain.inc.php
===================================================================
--- extensions/Shadogo/trunk/maintain.inc.php	(revision 10016)
+++ extensions/Shadogo/trunk/maintain.inc.php	(revision 10016)
@@ -0,0 +1,26 @@
+<?php
+/*
+Plugin Name: Shadogo
+Author: Binaryworld
+Author URI: http://binaryworld.hd.free.fr/
+*/
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+//if (!defined( 'DS')) define( 'DS', DIRECTORY_SEPARATOR );
+
+define('SHADOGO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+include_once SHADOGO_PATH .'config.inc.php';
+
+
+function plugin_install($plugin_id, $plugin_version, &$errors) { 
+	ShadogoConfig::install();
+}
+
+//function plugin_activate($plugin_id, $plugin_version, &$errors) { }
+
+//function plugin_deactivate($plugin_id) { }
+
+function plugin_uninstall($plugin_id) {
+	ShadogoConfig::uninstall();
+}
+
+?>
Index: extensions/Shadogo/trunk/overlaylibs.inc.php
===================================================================
--- extensions/Shadogo/trunk/overlaylibs.inc.php	(revision 10016)
+++ extensions/Shadogo/trunk/overlaylibs.inc.php	(revision 10016)
@@ -0,0 +1,193 @@
+<?php
+/*
+Plugin : Shadogo
+Plugin URI: http://binaryworld.hd.free.fr/
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+interface iModalOverlayLib {
+	static public function getName();
+	static public function isInstalled();
+	static public function getThemes();
+	public function getPlayerUrl();
+	public function getFlashVarsTemplate();
+	public function getDefaultLinkRelationship();
+	public function appendHeaderContent($template, $tpl_var, $config);
+	public function getCloseThumbnailJavaScript();
+}
+
+class ShadowboxWrapper implements iModalOverlayLib {
+	public static $LIB_NAME = 'shadowbox';
+	
+	static function getName() {
+		return self::$LIB_NAME;
+	}
+	
+	static public function isInstalled() {
+		$filename = ModalOverlayLibFactory::getFactoryPath() .DS. self::getName() .DS. 'shadowbox.js';
+		return file_exists($filename);
+	}
+	
+	public function getFlashVarsTemplate() {
+		return 'file={$VIDEO_URL}&image={$SRC_IMG}&controlbar.position=over';
+	}
+	
+	public function getPlayerUrl() {
+		$path = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName() .'/player.swf';
+		return $path;
+	}
+
+	public function getDefaultLinkRelationship() {
+		 return 'shadowbox';
+	}
+	
+	public function appendHeaderContent($template, $tpl_var, $config) {
+		$libPath = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName(); 
+		
+		$scriptContent = 'var shadogoOverlayWnd = Shadowbox; Shadowbox.init();';
+		$headContent  = '<link rel="stylesheet" type="text/css" href="'. $libPath .'/shadowbox.css">';
+		$headContent .= '<script type="text/javascript" src="'. $libPath .'/shadowbox.js"></script>';
+		$headContent .= '<script type="text/javascript">'. $scriptContent .'</script>';
+		
+		$template->append($tpl_var, $headContent);
+	}
+	
+	public function getCloseThumbnailJavaScript() {
+		return 'parent.window.Shadowbox.close(); return false;';
+	}
+
+	static public function getThemes() {
+		return array();
+	}
+}
+
+class MediaboxAdvancedWrapper implements iModalOverlayLib {
+	public static $LIB_NAME = 'mediaboxAdvanced';
+
+	static function getName() {
+		return self::$LIB_NAME;
+	}
+
+	static public function isInstalled() {
+		$filename = ModalOverlayLibFactory::getFactoryPath() .DS. self::getName() .DS. 'mediaboxAdv-1.3.4b.js';
+		return file_exists($filename);
+	}
+	
+	public function getFlashVarsTemplate() {
+		return 'mediaURL={$VIDEO_URL}&teaserURL={$SRC_IMG}&allowSmoothing=true&autoPlay=false&buffer=6&showTimecode=true&loop=false&controlColor=0xFFFFFF&controlBackColor=0x000000&scaleIfFullScreen=true&showScalingButton=true&defaultVolume=100&crop=false';
+	}
+	
+	public function getPlayerUrl() {
+		$path = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName() .'/NonverBlaster.swf';
+		return $path;
+	}
+	
+	public function getDefaultLinkRelationship() {
+		return 'lightbox';
+	}
+	
+	public function appendHeaderContent($template, $tpl_var, $config) {
+		global $page;
+		$libPath = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName(); 
+		$content = '';
+
+		// add script for services (used for "add to caddie")
+		//{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
+		$template->func_combine_script(
+			array(
+				'id' => 'core.scripts',
+				'load' => 'async',
+				'path' => 'themes/default/js/scripts.js'
+			),
+			$template->smarty
+		);
+		
+		$theme = $config->modalOverlayTheme;
+		if ( !empty( $theme )) {
+			$content .= '<link rel="stylesheet" href="'. $libPath .'/themes/style.css" type="text/css" media="screen" />';
+			$content .= '<link rel="stylesheet" href="'. $libPath .'/themes/'. $theme .'/style.css" type="text/css" media="screen" />';
+		}
+
+		$content .= '<script src="'. $libPath .'/mootools-1.2.5-core-yc.js" type="text/javascript"></script>';
+		$content .= '<script src="'. $libPath .'/Quickie.js" type="text/javascript"></script>';
+		$content .= '<script src="'. $libPath .'/mediaboxAdv-1.3.4b.js" type="text/javascript"></script>';
+		
+		$content .= '<script type="text/javascript">var ShadogoOverlayWnd=Mediabox; shadogoOptions = {';
+		$content .= 'piwigoRootUrl: "'. get_root_url() .'"';
+		if (isset($page['category'])) {
+		$content .= ', piwigoCategory: '. $page['category']['id'];
+		}
+		$content .= ', displayAddToBasket: '. (int) (is_admin() && $config->addToBasket && isset($page['category']));
+		$content .= ', displayFavorite: '. (int) (!is_a_guest() && $config->favoritePicture && isset($page['category']));
+		$content .= ', displayHdPicture: '. (int) $config->hdPicture;
+		$content .= ', displayDownload: '. (int) $config->downloadPicture;
+		$content .= '};</script>';
+		
+		$template->append($tpl_var, $content);
+	}
+
+	public function getCloseThumbnailJavaScript() {
+		return 'parent.window.Shadowbox.close(); return false;';
+	}
+	
+	static public function getThemes() {
+		return ModalOverlayLibFactory::getDirectoriesFromPath(ModalOverlayLibFactory::getFactoryPath() .DS. self::getName() .DS. 'themes');
+	}
+}
+
+
+class ModalOverlayLibFactory {
+	
+	
+	public static function getFactoryPath() {
+		return dirname(__FILE__) .DS. 'libs';
+	}
+	
+	public static function getOverlayLibPath($libName) {
+		return self::getFactoryPath() .DS. $libName;
+	}
+	
+	public static function getFactoryUrl() {
+		return get_root_url() .'plugins/'. basename(dirname(__FILE__)) .'/libs';
+	}
+	
+	public static function getInstalledOverlayLibs() {
+		$libs = array();
+		if (MediaboxAdvancedWrapper::isInstalled() === true) $libs[] =  MediaboxAdvancedWrapper::getName();
+		if (ShadowboxWrapper::isInstalled() === true) $libs[] =  ShadowboxWrapper::getName();
+		return $libs;
+	}
+	
+	public static function getDefaultOverlayLib() {
+		return MediaboxAdvancedWrapper::getName();
+	}
+	
+	public static function getDefaultOverlayTheme()	{
+		$themes = MediaboxAdvancedWrapper::getThemes();
+		return (empty($themes)) ? null : $themes[0];
+	}
+	
+	public static function createModalOverlayLib($libName) {
+		if (0 === strcmp($libName, MediaboxAdvancedWrapper::getName())) {
+			return new MediaboxAdvancedWrapper();
+		} else if (0 === strcmp($libName, ShadowboxWrapper::getName())) {
+			return new ShadowboxWrapper();
+		}
+		return null;
+	}
+	
+	public static function getDirectoriesFromPath($path) {
+		static $weeds = array('.', '..');
+		$directories = array_diff(scandir($path), $weeds);
+		$dirs = array(); 
+		foreach($directories as $value) {
+			if(is_dir($path .DS. $value)) {
+				$dirs[] = $value;
+			}
+		}
+		return $dirs;
+	}
+}
+
+?>
Index: extensions/Shadogo/trunk/release_note.txt
===================================================================
--- extensions/Shadogo/trunk/release_note.txt	(revision 10016)
+++ extensions/Shadogo/trunk/release_note.txt	(revision 10016)
@@ -0,0 +1,91 @@
+
+Overview
+========
+
+Shadogo allows the user to manage medias (flv, mp4, swf,...) in the same way that Piwigo does for pictures.
+We can add the medias in the gallery directory with their teaser images.
+The medias are easly added in Piwigo using the tools 'Thumbnails' and 'Synchronize' in the Piwigo web administration console.
+Medias (video, picture, HD picture) and Piwigo page (Content, Slideshow) can be displayed in modal overaly window.
+
+ex:
+/www/piwigo/gallery/my_event/my_video.flv
+/www/piwigo/gallery/my_event/my_video_-_flv_320x240.jpg
+
+The my_video_-_flv_320x240.jpg image will be displayed in the thumbnails as icon.
+The my_video.flv is displayed in the modal overlay window when the user click the thumbnail. 
+
+
+Shadogo v0.1.10
+===============
+
+- Piwishadow renamed to Shadogo (for copyright issue with Piwi channel)
+- User configuraion stored in database
+- Add download button in the overlay window (HD picture). Keyboard shortcut: 'd' or '*'  
+- Add basket button in the overlay window (visible only if admin access right). Keyboard shortcut: 'b' or '0' (NUMLOCK)
+- Add favorite button in the overlay window (visible for registered user). Keyborad shortcut: 'f' or '+'
+- Simplification of the mediaboxAvanced styles for better user experience (step 2)
+- Fix: over effect on the bottom links of mediaboxAvanced
+
+
+Piwishadow v0.1.9
+=================
+
+- Store the plugin configuration in ini file
+- Enhance plugin upgrade management. Add mainain.inc.php file to restore the user configuration after the plugin upgrade. 
+- Fix: buttonsTemplateSearch and hrefContentSearch configuration parameters
+- Fix: language files to replace 'shadowbox' by 'overlay window'  
+
+
+Piwishadow v0.1.8
+=================
+
+- Add HD/SD toggle button in mediaboxAvanced overlay to switch between SD and HD picture defintions. 
+  The Button is visible only if the HD picture is present in the Piwigo HD dir.  
+- 'libs' directory added for better integration of the modal overlay libs.
+- Simplification of the mediaboxAvanced styles for better user experience
+
+
+Piwishadow v0.1.7
+=================
+
+- Open the template API to enable to use piwishadow in custom template (refer to the template files to see the list of the supported parameters)
+- Add the support for the plugin resynchronization on the Piwigo repository for plugin upgrade
+- Show/Hide expert parameters in piwishadow administration page
+
+
+Piwishadow v0.1.6
+=================
+
+- Add support for extending the overlay themes: new theme can be created in the 'themes' directory of the overlay library. 
+  The themes are automatically detected by Piwishadow.
+- Add the 'grey' and 'white' theme for mediaboxAvanced library
+- Fix: Alt of the content icon in the thumbnail legend
+- Fix: Mix between content and page content gallery
+
+
+Piwishadow v0.1.5
+=================
+
+- Compatible with Piwigo 'Thumbnails' and 'Synchronize' tools
+- Auto sizing of the overlay window accoding to size specified in the name of the image file (optional) 
+- Display the media content from the thumbnail in a modal overlay window
+- Display of the slideshow in a modal overlay window
+- Display of the HD picture from the Piwigo content page in a modal overlay window
+- Display of embeded buttons in the thumbnails label for better media control
+- Web administration console for configuring the plugin
+- Support of the mediaboxAvanced library with NonverBlaster player  
+		- Support image: jpg, png, gif
+		- Support video: flv, mp4
+		- Support audio: mp3, aac
+		- Support flash: swf
+		- Support QuickTime plugin: mov, m4v, m4a, aiff, avi, caf, dv, mid, m3u, mp3, mp2, mp4, qtz
+- Support of the Shadowbox library (must be installed manually after the plugin installation from the official web site due to the license) with JW Player 
+
+
+
+TODO
+====
+
+- Enable to hide the header and footer when Piwigo pages are displayed in the overlay window
+- Add play and video overlay images on the thumbnail
+- HTML5 Support
Index: extensions/Shadogo/trunk/shadogo.css
===================================================================
--- extensions/Shadogo/trunk/shadogo.css	(revision 10016)
+++ extensions/Shadogo/trunk/shadogo.css	(revision 10016)
@@ -0,0 +1,20 @@
+@CHARSET "ISO-8859-1";
+/*
+Plugin Name: Shadogo
+Author: Binaryworld
+Author URI: http://binaryworld.hd.free.fr/
+*/
+
+.thumb-icon {
+	/* Code standard */ 
+	max-width: 16px; 
+	max-height: 16px; 
+ 
+	/* Code spécial IE */ 
+	_width: expression((this.offsetWidth>=this.offsetHeight) ? Math.min(parseInt(this.offsetWidth), 50 ) : true); 
+	_height: expression((this.offsetHeight>this.offsetWidth) ? Math.min(parseInt(this.offsetHeight), 50 ) : true);
+}
+
+.thumb-buttons {
+
+}
Index: extensions/Shadogo/trunk/template/index.php
===================================================================
--- extensions/Shadogo/trunk/template/index.php	(revision 10016)
+++ extensions/Shadogo/trunk/template/index.php	(revision 10016)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Shadogo - plugin for piwigo, a PHP based photo gallery             |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010-2011 BinaryWorld      http://binaryworld.hd.free.fr |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/Shadogo/trunk/template/thumbnail_shadogo_buttons.tpl
===================================================================
--- extensions/Shadogo/trunk/template/thumbnail_shadogo_buttons.tpl	(revision 10016)
+++ extensions/Shadogo/trunk/template/thumbnail_shadogo_buttons.tpl	(revision 10016)
@@ -0,0 +1,19 @@
+{if isset($thumbnail.NAME) && $shadogo.thumbContentLabel}{$thumbnail.NAME}{/if}
+<span class="thumb-buttons">
+{if !empty($thumbnail.VIDEO_URL) && $shadogo.thumbMediaPlayerIcon}
+	{assign var='U_PLAY_ICON' value=`$shadogo.pluginUrl`/images/play.png}
+	{if file_exists("`$themeconf.icon_dir`/play.png")} {assign var='U_PLAY_ICON' value=`$ROOT_URL``$themeconf.icon_dir`/play.png} {/if}
+	{include file="`$shadogo.overlayLibPath`rel_overlay.tpl" gallery='psplay' assign=rel_overlay}
+	<a href="{$thumbnail.U_OVERLAY}" {$rel_overlay}>
+		<img class="thumb-icon" title="{'shadogo_play'|@translate}" src="{$U_PLAY_ICON}" class="mediaplayer" alt="{'shadogo_play'|@translate}">
+	</a>
+{/if}
+{if $shadogo.thumbContentIcon}
+	{assign var='U_CONTENT_ICON' value=`$shadogo.pluginUrl`/images/content.png}
+	{if file_exists("`$themeconf.icon_dir`/content.png")} {assign var='U_CONTENT_ICON' value=`$ROOT_URL``$themeconf.icon_dir`/content.png} {/if}
+
+	<a href="{$thumbnail.URL}" {if $shadogo.thumbContentInOverlay}	rel="{$thumbnail.REL_OVERLAY}[pspagecontent 80% 80%]" {/if}	>
+		<img class="thumb-icon" title="{if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}" src="{$U_CONTENT_ICON}" class="mediaplayer" alt="{'shadogo_content'|@translate}">
+	</a>
+{/if}
+</span>
Index: extensions/Shadogo/trunk/template/thumbnail_shadogo_content.tpl
===================================================================
--- extensions/Shadogo/trunk/template/thumbnail_shadogo_content.tpl	(revision 10016)
+++ extensions/Shadogo/trunk/template/thumbnail_shadogo_content.tpl	(revision 10016)
@@ -0,0 +1,2 @@
+{include file="`$shadogo.overlayLibPath`rel_overlay.tpl" gallery='pscontent' assign=rel_overlay}
+href="{$thumbnail.U_OVERLAY}" {$rel_overlay}
Index: extensions/Shadogo/trunk/template/video_content.tpl
===================================================================
--- extensions/Shadogo/trunk/template/video_content.tpl	(revision 10016)
+++ extensions/Shadogo/trunk/template/video_content.tpl	(revision 10016)
@@ -0,0 +1,24 @@
+<div id="shadogo_mediaplayer">
+{if $MEDIA == 'swf'}
+	<object
+		id='ps-player'
+		name='ps-player'
+		type = 'application/x-shockwave-flash'
+		width='{$VIDEO_WIDTH}'
+		height='{$VIDEO_HEIGHT}'
+		data = '{$VIDEO_URL}'>
+		<param name='allowfullscreen' value='true'>
+	</object>
+{else}
+	<embed
+		id='ps-player'
+		name='ps-player'
+		width='{$VIDEO_WIDTH}'
+		height='{$VIDEO_HEIGHT}'
+		src='{$U_PLAYER}'
+		allowscriptaccess='always'
+		allowfullscreen='true'
+		flashvars='{eval var=$FLASH_VARS}'
+	/>
+{/if}
+</div>
