var count=35,speed=5;
function attachEvents(obj1,obj2){
	obj1=$(obj1);
//		obj1.style.position='relative';
	obj1._obj=$(obj2);
	obj1._animate=function(){
		clearTimeout(obj1._timer);
		if(obj1._orient=='show'){
			if((obj1._obj.offsetHeight+count)<obj1._objheight){
				obj1._obj.style.height=(obj1._obj.offsetHeight+count)+'px';
				obj1._timer=setTimeout(obj1._animate,speed);
			}
			else obj1._obj.style.height='auto';
		}
		else{
			if((obj1._obj.offsetHeight-count)>0){
				obj1._obj.style.height=(obj1._obj.offsetHeight-count)+'px';
				obj1._timer=setTimeout(obj1._animate,speed);
			}
			else{
				obj1._obj.style.position='absolute';
				obj1._obj.style.visibility='hidden';
				obj1._obj.style.overflow='visible';
				obj1._obj.style.height='auto';
			}
		}
	};
	
	(browser.isIE?obj1:$(obj2+'1')).onmouseover=function(){
		if((obj1._obj.style.position=='absolute')||!(obj1._objheight)){
			obj1._objheight=obj1._obj.offsetHeight;
			obj1._obj.style.height='1px';
			obj1._obj.style.overflow='hidden';
			obj1._obj.style.position='static';
			obj1._obj.style.visibility='visible';
		}
		obj1._orient='show';
		obj1._animate();
	};
	obj1.onmouseout=function(){
		obj1._orient='hide';
		obj1._animate();		
	};
};
document.ready(function(){
	attachEvents($('products_athena_box'),'athena_top');
	attachEvents($('products_flixo_box'),'flixo_top');
	attachEvents($('products_sjmepla_box'),'sjmepla_top');
});
