Event.observe(window, 'load', initGlobal);

function initGlobal() {
	Event.observe('input_email', 'click', function()  {
	    var object = $('input_email');
	    if (object.value == object.title)  { object.value = ''; }                      
	});
	Event.observe('input_email', 'blur', function()  {
	    var object = $('input_email');
	    if (object.value == '')  { object.value = object.title; }       
	});
	
    Shadowbox.init({
        continuous:     true,
        counterType:    'skip',
        loadingImage:   '/Commun/js/shadowbox/1.0/images/loading.gif',
        flvPlayer:      '/Commun/flash/mediaplayer/3.15.swf'
    });
}

/**
 * This function will add a target _blank effect with the onclick attribute
 * on any css selector (i.e a.blank => all the a with the class blank)
 * 
 * @author Francois Lavertu
 */
addTargetBlank = function(sCssSelector){
    $$(sCssSelector).invoke('observe', 'click', function(e){
        // check if the element as the href attribute 
        if(this.href){
            window.open(this.href); 
            Event.stop(e);    
        }    
    });
}

Event.observe(window, 'load', function() {
	addTargetBlank('a.blank');	
});