/**
 * Copper UI
 *
 * This file is Copyright 2008 Evan Edwards and is released under an MIT License.
 *
 * External source sections included (Rah, rah, cooperation!):
 *   FastInit (MIT License) http://www.tetlaw.id.au/view/javascript/fastinit
 */

var Cu = {

  version : '1.0',
  overlay : function() {
     var str = '';
     $$('.ClickToolbar').each(function(div) {
      $(div).setStyle({ border:0, padding:0, background:'#ddd' });
      str = $(div).innerHTML;
      $(div).update(   '<table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ddd" class="ClickToolbarCu01">' +
'<tr><td width="11"><img src="/i/click/e/cu/tile-1.png" width="11" height="11" alt="" class="ClickToolbarCorner ClickToolbarCornerUpper"></td><td style="background: #fff url(/i/click/e/cu/tile-2.png) repeat-x scroll top left"><td width="11"><img src="/i/click/e/cu/tile-3.png" width="11" height="11" alt="" class="ClickToolbarCorner ClickToolbarCornerUpper"></td></tr>' +
'<tr><td width="11" style="background: #fff url(/i/click/e/cu/tile-4.png) repeat-y scroll top left"><td style="background:#ddd;padding:0;">' +
          str +
'</td><td width="11" style="background: #fff url(/i/click/e/cu/tile-6.png) repeat-y scroll top right"></tr>' +
'<tr><td width="11"><img src="/i/click/e/cu/tile-7.png" width="11" height="11" alt="" class="ClickToolbarCorner ClickToolbarCornerLower"></td><td style="background: #fff url(/i/click/e/cu/tile-8.png) repeat-x scroll bottom left"><td width="11"><img src="/i/click/e/cu/tile-9.png" width="11" height="11" alt="" class="ClickToolbarCorner ClickToolbarCornerLower"></td></tr></table>' );
      $(div).setStyle({ border:0, padding:0, paddingBottom: 22, background:'#fff' });
    });

     $$('.ClickStrip').each(function(e) {
      $(e).insert({
        before: '<span style="font-size: 14px;vertical-align:baseline;border: 1px solid #fff;border-width:1px 0;position:relative;left:1px;">&nbsp;</span>',
        after:  '<span style="font-size: 14px;vertical-align:baseline;border: 1px solid #fff;border-width:1px 0;position:relative;left:-1px;">&nbsp;</span>'
      });
    });

     $$('.ClickTile').each(function(div) {
      $(div).setStyle({ border:0, padding:0, background:'#ddd' });
      str = $(div).innerHTML;
      $(div).update(   '<table cellpadding="0" cellspacing="0" border="0" width="100%" bgcolor="#ddd" class="ClickTileCu01">' +
'<tr><td width="11"><img src="/i/click/e/cu/tile-1.png" width="11" height="11" alt="" class="ClickTileCorner ClickTileCornerUpper"></td><td style="background: #fff url(/i/click/e/cu/tile-2.png) repeat-x scroll top left"><td width="11"><img src="/i/click/e/cu/tile-3.png" width="11" height="11" alt="" class="ClickTileCorner ClickTileCornerUpper"></td></tr>' +
'<tr><td width="11" style="background: #fff url(/i/click/e/cu/tile-4.png) repeat-y scroll top left"><td style="background:#ddd;padding:.5em;">' +
          str +
'</td><td width="11" style="background: #fff url(/i/click/e/cu/tile-6.png) repeat-y scroll top right"></tr>' +
'<tr><td width="11"><img src="/i/click/e/cu/tile-7.png" width="11" height="11" alt="" class="ClickTileCorner ClickTileCornerLower"></td><td style="background: #fff url(/i/click/e/cu/tile-8.png) repeat-x scroll bottom left"><td width="11"><img src="/i/click/e/cu/tile-9.png" width="11" height="11" alt="" class="ClickTileCorner ClickTileCornerLower"></td></tr></table>' );
      $(div).setStyle({ border:0, padding:0, paddingBottom: 22, background:'#fff' });
    });
     $$('.ClickToolbar + .ClickToolbar').each(function(div) {
       $(div).setStyle({ position: 'relative', top: '-11px', paddingBottom: 0 });  });
     $$('.ClickToolbar + .ClickToolbar img.ClickToolbarCornerUpper').each(function(div) {
       $(div).setStyle({  display: 'none' }); });

     $$('.ClickToolbar + .ClickTile').each(function(div) {
       $(div).setStyle({ position: 'relative', top: '-11px', paddingBottom: 0 });  });
     $$('.ClickToolbar + .ClickTile img.ClickTileCornerUpper').each(function(div) {
       $(div).setStyle({  display: 'none' }); });

  }
};



/********************************************************************** FastInit */
/*
*
* Copyright (c) 2007 Andrew Tetlaw
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* *
*
*
* FastInit
* http://tetlaw.id.au/view/javascript/fastinit
* Andrew Tetlaw
* Version 1.4.1 (2007-03-15)
* Based on:
* http://dean.edwards.name/weblog/2006/03/faster
* http://dean.edwards.name/weblog/2006/06/again/
* Help from:
* http://www.cherny.com/webdev/26/domloaded-object-literal-updated
*
*/
var FastInit = {
  onload : function() {
    if (FastInit.done) { return; }
    FastInit.done = true;
    for(var x = 0, al = FastInit.f.length; x < al; x++) {
      FastInit.f[x]();
    }
  },
  addOnLoad : function() {
    var a = arguments;
    for(var x = 0, al = a.length; x < al; x++) {
      if(typeof a[x] === 'function') {
        if (FastInit.done ) {
          a[x]();
        } else {
          FastInit.f.push(a[x]);
        }
      }
    }
  },
  listen : function() {
    if (/WebKit|khtml/i.test(navigator.userAgent)) {
      FastInit.timer = setInterval(function() {
        if (/loaded|complete/.test(document.readyState)) {
          clearInterval(FastInit.timer);
          delete FastInit.timer;
          FastInit.onload();
        }}, 10);
    } else if (document.addEventListener) {
      document.addEventListener('DOMContentLoaded', FastInit.onload, false);
    } else if(!FastInit.iew32) {
      if(window.addEventListener) {
        window.addEventListener('load', FastInit.onload, false);
      } else if (window.attachEvent) {
        return window.attachEvent('onload', FastInit.onload);
      }
    }
  },
  f:[],done:false,timer:null,iew32:false
};
/*@cc_on @*/
/*@if (@_win32)
FastInit.iew32 = true;
document.write('<script id="__ie_onload" defer src="' + ((location.protocol == 'https:') ? '//0' : 'javascript:void(0)') + '"><\/script>');
document.getElementById('__ie_onload').onreadystatechange = function(){if (this.readyState == 'complete') { FastInit.onload(); }};
/*@end @*/
FastInit.listen();


FastInit.addOnLoad(Cu.overlay);
