Im trying to convert this code to use Click instead of Hover. I have comment out original hover line //.


How it works, if you "Hover" (want as click) over PLUS(1), its hides PLUS(1) and display a new image(1) and embeds sound(1). If you "Hover" on new PLUS(2), it hides old new image(1) and display new image(2) and embeds sound(2).

If I add Click, it works (removes plus, adds new image and sound) other then when I Click on new PLUS, it does not remove the old image(1) new image (2) and sound(2) works.

So Im looking for a way with "Click" to know how to remove old image(1), hope I was able to explain, thanks for all your ideas and or help


Code:
$(document).ready(function(){qs();$('#my-list').css({'height':newhsHt});
$('#my-list').hoverscroll({fixedArrows:false,rtl:false,width:newhsWth,height:newhsHt});initScroll();initialWidth();
//$("ul.thumb li").hover(function(){for(i=0;i<storyTitles.length;i++){if($(this).attr('id')==storyTitles[i]){populate(storyTitles[i]);}}
$("ul.thumb li").click('click', function(){for(i=0;i<storyTitles.length;i++){if($(this).attr('id')==storyTitles[i]){populate(storyTitles[i]);}}
	if(mousedout==false&&$(this).attr('id')!=qsParm['title']){clearHover();mousedout=true;}
	else if(mousedout==false&&$(this).attr('id')==qsParm['title']){if(count==1){mousedout=true;return;}count++;}
		$(this).css({'z-index':'999999'});tempwth=$(this).find('img').attr('width');tempht=$(this).find('img').attr('height');
		$(this).children('.plus').css({'display':'none'});
		$(this).children('a').children('.cover').addClass("hover").stop().animate({marginTop:hoverVarTmp[0]+px,marginLeft:hoverVarTmp[1]+px,width:hoverVarTmp[2]+px,height:hoverVarTmp[3]+px,padding:'0px'},200);
	if(browser=="Microsoft Internet Explorer"&&os=="Win 7"){document.writeln("<bgsound src='"+hoverVarTmp[4]+"'>");}
	else{$('#sound_element').html("<embed src='"+hoverVarTmp[4]+"' hidden='true' autostart='true' type='audio/mpeg' loop='false'>");}},
	function(){
		$(this).css({'z-index':'0'});
		$(this).children('a').children('.cover').removeClass("hover").stop().animate({marginTop:'0px',marginLeft:'0px',width:'0px',height:'0px',padding:'0px'},400);
		$(this).children('.plus').css({'display':'inline'});});$('ul.thumb #'+qsParm['title']).trigger("mouseover");});