var noteTimer;

// obj = object by which the note layer is positioned
// action = can be "addedtobasket" or "addedtolightbox"
function showNote(obj,action) {
	clearTimeout(noteTimer);
	$("#noteaddedtobasket").hide();
	$("#noteaddedtolightbox").hide();
	$("#notenotselected").hide();
	var note;
	if(action=="addedtobasket") {
		note = $("#noteaddedtobasket");
	} else if(action=="addedtolightbox") {
		note = $("#noteaddedtolightbox");
	}
	else if(action=="notselected") {
		note = $("#notenotselected");
	}
	note.css({'left' : $(obj).offset().left, 'top' : $(obj).offset().top-103}).show();
	if(action=="addedtobasket") {
		noteTimer = setTimeout("$('#noteaddedtobasket').fadeOut('fast')",1000);
	} else if(action=="addedtolightbox") {
		noteTimer = setTimeout("$('#noteaddedtolightbox').fadeOut('fast')",1000);
	} else if(action=="notselected") {
		noteTimer = setTimeout("$('#notenotselected').fadeOut('fast')",1000);
	}
}

