document.observe('dom:loaded', function() {
  $$('.wc').each(function(element) {

    new Tip(element, {
        title : 'WordCode Editor'
        , ajax: {
            url: site_path+site_gallery_path+'/iFrame?wc='+element.innerHTML+'&contest=1&settings_path='+'/content/'
            , options: {
                method: 'get' 
                , onComplete: function(transport) {
                    $$('form').each(function(item) {
                        item.action = site_path+'/admin/international/modify?ret_url='+location.href;
                    });
                    // you could do something here after the ajax call is finished
                }
            }
        }
        , hideOn: { element: 'closeButton', event: 'click' }
        , showOn: 'click'
        , width: 'auto' // We don't want the default 250px.
                       // Images inside the tooltip will need to have dimensions set since Prototip needs to fixate width for proper rendering.
        , hook: { target: 'bottomMiddle', tip: 'topMiddle' }
        , stem: 'topMiddle'
        , offset: { x: 7, y: 18 }
    });  
    element.style.color = '#FF0000';
    element.style.border = '1px doth #FFFFFF';
    element.style.cursor = 'crosshair';
    element.innerHTML = "Edit: "+element.innerHTML;
  
  
  

    
  

  
  });
});
