var $j = jQuery;
jQuery.noConflict();

function set_language(lang, url) {
  new Ajax.Request('/set_language/' + lang, {
    parameters: { authenticity_token: window._token },
    onComplete: function() {
      document.location.href = url;
    }
  })
}

$j.fn.zoomable = function(klass) {
  return this.each(function() {
    var img = jQuery(this);
    var zoom = jQuery("<img class='zoom " + klass + "' src='/images/zoom.gif' border='0'/>");
    var a = img.parent();
    a.bind('mouseenter', function() {
      zoom.fadeIn();
    }).bind('mouseleave', function() {
      zoom.fadeOut();
    });
    a.prepend(zoom);
  }); 
};