(function() {
  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
    for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
    function ctor() { this.constructor = child; }
    ctor.prototype = parent.prototype;
    child.prototype = new ctor;
    child.__super__ = parent.prototype;
    return child;
  };
  $(function() {
    var link, new_window;
    $(".nav a.active").removeClass("active");
    if ((link = $(".nav a[href*='" + window.location.pathname.substr(-8) + "']")).length > 0) {
      link.addClass("active");
    } else {
      $("a.home").addClass("active");
    }
    $("#h").cycle({
      delay: -2500
    });
    $("a[rel='gallery']").colorbox({
      scalePhotos: true,
      maxHeight: "100%",
      slideshow: true
    });
    window.Workspace = (function() {
      __extends(Workspace, Backbone.Router);
      function Workspace() {
        this.initialize = __bind(this.initialize, this);
        Workspace.__super__.constructor.apply(this, arguments);
      }
      Workspace.prototype.initialize = function(opts) {
        return this.setLanguage = function(lang) {
          var idiomas;
          idiomas = "en fr es";
          return $('body').removeClass(idiomas).addClass(lang);
        };
      };
      Workspace.prototype.routes = {
        "": "en",
        "es": "es",
        "en": "en",
        "fr": "fr"
      };
      Workspace.prototype.es = function() {
        return this.setLanguage("es");
      };
      Workspace.prototype.fr = function() {
        return this.setLanguage("fr");
      };
      Workspace.prototype.en = function() {
        return this.setLanguage("en");
      };
      return Workspace;
    })();
    new Workspace;
    Backbone.history.start();
    new_window = null;
    return $(".jp-play").bind("click", function() {
      var url;
      if (!new_window) {
        url = "/music.html";
        new_window = window.open(url, 'Music', 'height=100,width=100');
        return $(window).focus();
      } else {
        return $(new_window).focus();
      }
    });
  });
}).call(this);

