/* ***** BEGIN LICENSE BLOCK *****
*                 __
*    ____ __     / /____    _________ _______ ______  _     _ 
*   / ____) \   / / ____)  |___   ___|  _____/  ____)| |   | |
*  | (___  \ \_/ / (___  _____ | |   | |___  | |     | |___| |
*   \___ \  \   / \___ \|_____|| |   |  ___| | |     |  ___  |
*   ____) |  | |  ____) |      | |   | |_____| |____ | |   | |
*  (_____/   |_| (_____/       |_|   |_______\______)|_|   |_|
*                          Web, Médias et Technologies libres   
*
*  Copyright notice
*
*  (c) 2009 Yugoo (SYS-TECH) <guillaume.coguiec@sys-tech.net>
*  All rights reserved
*
*  This script is part of the TYPO3 project. The TYPO3 project 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; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*
*  This script 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.
*
*  This copyright notice MUST APPEAR in all copies of the script!
*
* ***** END LICENSE BLOCK ***** */

/**
 * Display images randomly
 * @require : jquery.js
 */

$(document).ready(
    function(){
        if ($('#logo-list').length > 0) {
            $('#logo-list li a').attr('href', $('#url').attr('value'));
            var elements = $('#logo-list').children('li');
            $(elements[Math.floor(Math.random()*(elements.length))]).show();  
        } 
    }   
);
