/* This is used to hide/show the share content */

function showhide(id){
if (document.getElementById){
obj = document.getElementById(id);
if (obj.style.display == "none"){
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
}


	window.addEvent('domready', function(){
			var szNormal = 30, szSmall  = 20, szFull   = 108;

			var kwicks = $$("#kwicks .kwick");
			var fx = new Fx.Elements(kwicks, {wait: false, duration: 300, transition: Fx.Transitions.Quad.easeOut});
			kwicks.each(function(kwick, i) {
				kwick.addEvent("mouseenter", function(event) {
					var o = {};
					o[i] = {width: [kwick.getStyle("width").toInt(), szFull]}
					kwicks.each(function(other, j) {
						if(i != j) {
							var w = other.getStyle("width").toInt();
							if(w != szSmall) o[j] = {width: [w, szSmall]};
						}
					});
					fx.start(o);
				});
			});

			/* $("kwicks").addEvent("mouseleave", function(event) {
				var o = {};
				kwicks.each(function(kwick, i) {
					o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
				});
				fx.start(o);
			}) */

      var currSect = '/' + (location.pathname.split('/')[2]);
      var menuItems= $('mainNav').getElementsByTagName('a');
      var sections = {
        '/learn_more'  : menuItems[0],
        '/get_involved': menuItems[1],
        '/about_us'    : menuItems[2],
        '/imax'        : menuItems[3]
      };
      for(var key in sections){
        if(key == currSect) sections[key].className='selected';
      }
		});

