/**
 * @author Profitroom
 */

var isOpen = false;

window.addEvent('domready',function(){
	$('eventSlide').addEvent('mouseenter',function(e){
				var ev = new Event(e);
				ev.stop();
				open_book();
			});
	$$('.attrHld').each(function(element){
		element.addEvents({
			'mouseenter':function(){
				this.addClass('active')
			},
			'mouseleave':function(){
				this.removeClass('active')
			}
		})
	})
})


function open_book()
{
	if(isOpen)
		return;
	
	isOpen = true;
	
	var box1 = $('bookTopPadding');
	var box = $('panelAnim');
	
	box1.fx = new Fx.Tween(box1,{duration: 300, transition: Fx.Transitions.Sine.easeOut});
	box.fx = new Fx.Tween(box,{duration: 300, transition: Fx.Transitions.Sine.easeOut});
	
	box.fx.start('height',65);
	if (box1.getSize().y == 105 || box1.getSize().y == 70 ) {
		box1.fx.start('height', 70);
	}
	else {
		box1.fx.start('height', 35);
	}
}


