function man_giuntios_product_article_init() {

  var MODULE_URL = null;
  $('script').map(function(i) { 
    if (this.src.match(/man_giuntios_product_article_init\.js(\?.*)?$/)) {
      MODULE_URL = this.src.replace(/\/man_giuntios_product_article_init\.js(\?.*)?$/, '');
    }
  });  

  $("*[sancho_entity_type='ManGosArticle']").each(function(i) {
    ////////////////////// START TOOLTIP ////////////////////////  
    $('#camargue_tooltip').unbind('mouseup');
  	$(this).bind('mouseup', function(e) { 
      //this one line will disable the right mouse click menu  
      if(!e.ctrlKey) $(document)[0].oncontextmenu = function() {return false;}  
      var rightclick;
      if (!e) var e = window.event;
      if (e.which) rightclick = (e.which == 3);
      else if (e.button) rightclick = (e.button == 2);
      if (rightclick) {
      	Camargue.Tooltip.hide(); 
        Camargue.Tooltip.keepVisible = true;                        	                   					            
        Camargue.Tooltip.empty(); 
        ///////////// START ACTIONS //////////////         
        var params = '';        
        params += 'sancho_entity_id=' + $(this).attr('sancho_entity_id'); 
        params += '&sancho_content_slot_id=' + $(this).parent().attr('sancho_entity_id');      
        params += '&sancho_page_area_name=' + $(this).parent().parent().attr('id');                   
        var credits = 'module: _ catalog articles _ v.0.1 _ vendor: _ <a href="http://www.manadv.com">man</a> _ last update: _ 04-01-10';
        Camargue.Tooltip.addBlockTitle('Article');  
        Camargue.Tooltip.addLink('Edit', MODULE_URL + '/edit_article.php' + '?' + params, credits, {type: 'edit', modalWidth: 550, modalHeight: 480, modalName: 'man_giuntios_product_article_edit'});
        Camargue.Tooltip.addLink('Remove', MODULE_URL + '/remove_article.php' + '?' + params, credits, {type: 'delete', modalWidth: 450, modalHeight: 110, modalName: 'man_product_article_remove'});      
				///////////// END ACTIONS ///////////////
      	Camargue.Tooltip.show(e);
      }            
    });
    $('*').click(function(){
    	Camargue.Tooltip.hide(); 
    });    
    //////////////////////// END TOOLTIP //////////////////////////                  
	});
  
    ///////////////////////// CLIENT INIT ///////////////////////////////
  
  
	// settings for tooltip
	var settings_tooltip = {
		effect: 'slide',
		lazy: false,
		fadeOutSpeed: 500,
		delay: 30,
		predelay: 100,
		relative: true,
		position: "top center",
		relative:false,
		offset: [15, 0]
	};
	
	//set tooltips
	$('*.article_tooltip').tooltip(settings_tooltip);
	
	//add to cart
 	$('a.addtocart').click(function(e) {
 	if ( $(this).hasClass('disabled') ) return false;
    if (Camargue.modals['shopping_cart']) {
    	Camargue.modals['shopping_cart'].close();
    }
    var fv = new FancyViewer({theme: 'giuntios_green'});
    fv.addToSet('/modals/shopping_cart.php?action=adjust_quantity&product_id=' + $(this).attr('rel') + '&quantity=1', 'Aggiungi al carrello', '', {width: 550, height: 410});
    fv.open(0);
    Camargue.modals['shopping_cart'] = fv;
    return false;
    });
  
	//add to wishlist
 	$('a.addtowishlist').click(function(e) {
 	if ( $(this).hasClass('disabled') ) return false;
    if (Camargue.modals['wishlist']) {
    	Camargue.modals['wishlist'].close();
    }
    var fv = new FancyViewer({theme: 'giuntios_blu'});
    fv.addToSet('/modals/wishlist.php?action=adjust_quantity&product_id=' + $(this).attr('rel') + '&quantity=1', 'Aggiungi alla lista dei desideri', '', {width: 550, height: 410});
    fv.open(0);
    Camargue.modals['wishlist'] = fv;
    return false;
    });

} 





