When developing JS scripts for Drupal, the built-in jquery is called in a rather strange way, you need to wrap your functions as though
(function ($) { .... Ф-я }) (jQuery);
The question itself: Here there is a crest causing a modal window with a form:
$(function() { $("a[rel]").overlay(function() { var wrap = this.getContent().find("div.wrap"); if (wrap.is(":empty")) { wrap.load(this.getTrigger().attr("href")); } }); });
I make out in the image and likeness of it with the fact that I wrote above, but nothing works, while everything works fine without drupal, but when I try to embed it, it doesn't.
Actually, the question is: how to properly execute js-scripts for developing with drupal?