jQuery(function(){
    jQuery(".action_min").mousedown(minModule);
    jQuery(".action_max").mousedown(maxModule);
    jQuery(".action_close").mousedown(closeModule);
});

function minModule() {
	jQuery(this).hide(); 
	jQuery(this).parent().parent().parent().find(".portletContent").hide();
	jQuery(this).siblings(".action_max").show();
};

function maxModule() {
	jQuery(this).hide(); 
	jQuery(this).parent().parent().parent().find(".portletContent").show();
	jQuery(this).siblings(".action_min").show();
};

function closeModule() {
	jQuery(this).parent().parent().parent().hide();
};