function glbclose()
{

}
function chageStatus(id,status)
{
	if (status == 'opened')
	{
		zz = document.getElementById('meo-'+id).getAttribute('name');
		if(zz == 'opening')
		{
			document.getElementById('meo-'+id).setAttribute('name', status);
			document.getElementById('meo-'+id).name = status;
		}
	}
	else if (status == 'closed')
	{
		zz = document.getElementById('meo-'+id).getAttribute('name');
		if(zz == 'closing')
		{
			document.getElementById('meo-'+id).setAttribute('name', status);
			document.getElementById('meo-'+id).name = status;
		}
	}
	else 
	{
		document.getElementById('meo-'+id).setAttribute('name', status);
		document.getElementById('meo-'+id).name = status;
	}
}
function melon(id)
{
	setTimeout("chageStatus('"+id+"','opening');",0);
	setTimeout("melonH('"+id+"',60);",0);
	setTimeout("meoonH('"+id+"',20,0);",1);
	setTimeout("meoonH('"+id+"',40,0);",50);
	setTimeout("meoonH('"+id+"',60,60);",100);
	setTimeout("meoonH('"+id+"',80,85);",150);
	setTimeout("meoonH('"+id+"',100,110);",200);
	setTimeout("meoonH('"+id+"',120,135);",250);
	setTimeout("meoonH('"+id+"',110,122);",325);
	setTimeout("meoonH('"+id+"',100,110);",375);
	setTimeout("chageStatus('"+id+"','opened');",380);
}	
function melonH(id,val)
{
	zz = document.getElementById('meo-'+id).getAttribute('name');
	if(zz == 'opening')
	{
		document.getElementById('mel-'+id).setAttribute('style', 'display: none;');
		document.getElementById('mel-'+id).style.setAttribute('cssText', 'display: none;', 1);
	}
}
function meoonH(id,val,val2)
{
	zz = document.getElementById('meo-'+id).getAttribute('name');
	if(zz == 'opening')
	{
		document.getElementById('meo-'+id).setAttribute('style', 'height:'+val+'px !important;line-height:'+val2+'px;');
		document.getElementById('meo-'+id).style.setAttribute('cssText', 'height:'+val+'px !important;line-height:'+val2+'px;', 2);
	}
}
function meloff(id)
{
	setTimeout("chageStatus('"+id+"','closing');",0);
	setTimeout("meloffH('"+id+"',25);",110);
	setTimeout("meloffH('"+id+"',10);",140);
	setTimeout("meloffH('"+id+"',25);",170);
	setTimeout("meloffH('"+id+"',40);",210);
	setTimeout("meloffH('"+id+"',55);",245);
	setTimeout("meloffH('"+id+"',70);",280);
	setTimeout("meloffH('"+id+"',25);",320);
	setTimeout("meloffH('"+id+"',25);",400);
	
	setTimeout("meooffH('"+id+"',100);",1);
	setTimeout("meooffH('"+id+"',80);",50);
	setTimeout("meooffH('"+id+"',60);",100);
	setTimeout("meooffH('"+id+"',20);",150);
	setTimeout("meooffH('"+id+"',0);",200);
	setTimeout("meooffH('"+id+"',0);",400);
	
	setTimeout("turnoff('"+id+"',0);",401);
	setTimeout("chageStatus('"+id+"','closed');",402);
}
function meloffH(id,val)
{
	zz = document.getElementById('meo-'+id).getAttribute('name');
	if(zz == 'closing')
	{
		document.getElementById('mel-'+id).setAttribute('style', 'margin-top:'+val+'px !important;');
		document.getElementById('mel-'+id).style.setAttribute('cssText', 'margin-top:'+val+'px !important;', 1);
	}	
}
function meooffH(id,val)
{
	zz = document.getElementById('meo-'+id).getAttribute('name');
	if(zz == 'closing')
	{
		document.getElementById('meo-'+id).setAttribute('style', 'height:'+val+'px !important;');
		document.getElementById('meo-'+id).style.setAttribute('cssText', 'height:'+val+'px !important;', 2);
	}		
}
function turnoff(id,val)
{	
	zz = document.getElementById('meo-'+id).getAttribute('name');
	if(zz == 'closing')
	{
		document.getElementById('meo-'+id).setAttribute('style', 'height:0px;display:none;');
		document.getElementById('meo-'+id).style.setAttribute('cssText', 'height:0px;display:none;', 2);
	}
}

/////////////////////////////////////////////////////////

$(function(){

		var options = {};
		$("#desc").show('drop',{},500);


	
	//Get our elements for faster access and set overlay width
	var div = $('div.sc_menu'),
			   ul = $('ul.sc_menu'),
			   // unordered list's left margin
			   ulPadding = 15;

	//Get menu width
	var divWidth = div.width();

	//Remove scrollbars
	div.css({overflow: 'hidden'});

	//Find last image container
	var lastLi = ul.find('li:last-child');

	//When user move mouse over menu
	div.mousemove(function(e){

	//As images are loaded ul width increases,
	//so we recalculate it each time
	var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;

	var left = (e.pageX - div.offset().left) * (ulWidth-divWidth) / divWidth;
	div.scrollLeft(left);
	});
});
