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

// Douglas Crockford's prototypal inheritance
// http://javascript.crockford.com/prototypal.html
if (typeof Object.create !== 'function') {
    Object.create = function (o) {
        function F() {}
        F.prototype = o;
        return new F();
    };
};

// Eric Knudtson's string shortcasing
shortcase = function(s) {
  s = s.toLowerCase();
  s = s.gsub(/[^a-z0-9]/, '_');
  s = s.gsub(/__*/,'_');
  s = s.gsub(/_$/,'');
  s = s.gsub(/^_/,'');
  return s;
};


document.observe("dom:loaded",function() {
  RESTO.StarControl.init();
  RESTO.PhotoControl.init();
  RESTO.ScrollControl.init();
  RESTO.LinkListControl.init();
});

trace = function(message) {
  /*if(console != undefined) {
    console.log(message);
  }*/
}
