/* debugging and under-construction effects */
$(function() {
  $('.stub').mouseenter(
    function() {
      raos.log('open');
      var p = $(this).offset();
      $('<div class="stub-message">Under Construction</div>')
        .css({ 
          position :'absolute',
          cursor: 'wait', textAlign:'center', padding:'5px',
          left : p.left,
          'top' :p.top, height:$(this).outerHeight(),width:$(this).outerWidth(),
          backgroundColor: 'black', color:'white',opacity:0.8
          })
        .appendTo('body')
        .mouseout(function() {$(this).remove()});
    }
  );
});


var raos  = {
  logPipe : function() {
    this.log.apply(this.log,arguments);
    return arguments[0];
  },
  // x-browser debug helpers.
  log : function() {
    if(window['console'] && window.console['log']) {
      if(console.log.apply) console.log.apply(console,arguments);
      else { // *some* brower's consoles (IE) don't support apply?!
        var out=''; 
        for(var i = 0; i < arguments.length; i++) {
          out += arguments[i];
        }
        console.log(out);
      }
    }
    else if (window['jash'] && jash.dump) jash.dump.apply(jash,arguments); 
  },
  alert : function(msg) {
    if(window['console'] && window.console['info'] && console.info.apply) console.info.apply(console,arguments);
    else if (window['jash'] && jash.dump) jash.dump.apply(jash,arguments); 
    else alert(msg);
  },
  /* draw box around element */
  highlight : function(el) { }
};

