j$(document).ready(function(){
  j$('.close_dialog').click(function(event){
    j$('.image_upload').dialog('close');
  });
  j$('.image_upload').dialog({ width: 400, autoOpen: false, resizable: false });
});

function initialize() {
  $$(".autocomplete_users").each(function(element) {
    new Qiro.Autocompleter.User(element, { tokens: ',' });
  }.bind(this));

  if ($('notifications')) {
    Effect.Pulsate( $$('#notifications ul')[0], { pulses: 1, duration: 1 })
  };
}

document.observe("dom:loaded", initialize);
