 $(document).ready(function () {
 
	updateCount();
	
	$("#menu_nav li a").not("#menu_nav li.active a").hover(
		function () {
			$(this).animate({left: "+=10"}, 300);
		},
		function () {
			$(this).animate({left: "-=10"}, 300);
		}
	);
	
 });
 
  function updateCount() {
	  next = -(1000 / memPerSec)*Math.log(Math.random());
	  memCountString = '' + memCount;
	  len = memCountString.length;
	  memCountString = memCountString.substr(0,len-6)+" "+memCountString.substr(len-6,3)+" "+memCountString.substr(len-3,3);
	  document.getElementById('howMuch').innerHTML = memCountString;
	  memCount = memCount + 1;
	  setTimeout(updateCount, next);
 }	
 
 function showsub(id) {
	$("#"+id).slideToggle(function () {
		if ($(this).css("display") == "none") {
			$("#"+id+" ul").hide();
		}
	});
	}
	
function mirror(obj){
var t,w,h,c,e,opacity,percent;
opacity = 80; // opacity
area = 20; // area
e=/*@cc_on!@*/false;
if(e){
	o=opacity;
}
else
{
	o=opacity/100;
}
t=obj.parentNode;
w=obj.offsetWidth;
h=obj.offsetHeight;
c=o/((h/100)*area);
	for(i=1;i<=((h/100)*area);i++){
		sp = document.createElement('SPAN');
		sp.style.display='block';
		sp.style.backgroundImage='url('+obj.src+')';
		sp.style.backgroundPosition='0px '+i+'px';
		if(e){
			sp.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+o+')';
		}
		else
		{
			sp.style.opacity = o;
		}
		sp.style.height='1px';
		sp.style.width=w+'px';
		t.appendChild(sp);
		o=o-c;
	}
};
