if (!window.DED) {
  DED = {};
}

(function() {
  var Y = YAHOO.util,
      Event = Y.Event,
      Dom = Y.Dom;
  var onTour = false;
  /*
  var getRandomPoint = function() {
  		return [ Math.floor(Math.random() * Dom.getViewportWidth()),
  		Math.floor(Math.random() * Dom.getViewportHeight()) ];
  };
  */

		
  var scaleBridge = function(e) {
    Event.preventDefault(e);
    var which = this.id.split('-')[1];
    scale(which);
  };
  var scale = function(i) {
    var size = sizes[i];
    var b = document.body;
    Dom.replaceClass(b, 'normal', size);
    Dom.replaceClass(b, 'large', size);
    Dom.replaceClass(b, 'larger', size);
  };
  Event.on('scale-0', 'click', scaleBridge);
  Event.on('scale-1', 'click', scaleBridge);
  Event.on('scale-2', 'click', scaleBridge);

  var SearchPlay = function(el) {
    var el = Dom.get(el);
    var orig = el.defaultValue;
    var f = function() {
      if ( el.value == orig ) {
        el.value = '';
      }
    };
    var b = function() {
      if ( el.value == '' ) {
        el.value = orig;
      }
    };
    Event.on(el, 'focus', f);
    Event.on(el, 'blur', b);
  };
  Event.onAvailable('s', SearchPlay, 's');
})();