For 3 menus
<div class="class1" onclick="showhide('id11','id2','id3',this)"> GOING UP </div>
<div class="class2" onclick="showhide('id1','id2','id3',this)"> GOING UP </div>
<div class="class2" onclick="showhide('id1','id2','id',this)"> GOING UP </div>
function showhide(a,b,c,d)
{
//alert("here");
$('.classname1').attr('class','classname2');
$(d).attr('class','videomenubg');
document.getElementById(a).style.display="block";
document.getElementById(b).style.display="none";
document.getElementById(c).style.display="none";
}
<div class="class1" onclick="showhide('id11','id2','id3',this)"> GOING UP </div>
<div class="class2" onclick="showhide('id1','id2','id3',this)"> GOING UP </div>
<div class="class2" onclick="showhide('id1','id2','id',this)"> GOING UP </div>
function showhide(a,b,c,d)
{
//alert("here");
$('.classname1').attr('class','classname2');
$(d).attr('class','videomenubg');
document.getElementById(a).style.display="block";
document.getElementById(b).style.display="none";
document.getElementById(c).style.display="none";
}