// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// Check whether we're looking at Internet Explorer
function is_explorer() {
  if( navigator.userAgent.indexOf('MSIE') != -1 ) {
    return true
  } else {
    return false
  }
}
// Check whether we're looking at Mozilla Firefox
function is_firefox() {
  if( navigator.userAgent.indexOf('Firefox') != -1 ) {
    return true
  } else {
    return false
  }
}

// Send something to Firebug's log
function log( message ) {
  if( is_firefox() ) {
    console.log( message );
  }
}

function timeoutElement( id, timeout ) {
  if( $(id) ) {
    setTimeout( "new Effect.Fade('"+id+"')", timeout )
  }
}

window.onload = function() {
  timeoutElement( 'flashbox', 3000 )
}

