<!--

Initialise.addEvent(function() {

	// Hide specialshop division.
	$('specialshops').hide();

	// Add Eventlistener to trigger elements.
	Event.observe($('SpShUpperTrigger'),
		'click',SpShop.show,false
	);
	Event.observe($('SpShLowerTrigger'),
		'click',SpShop.show,false
	);
	
	items = $$('a.information');

	if (items.length > 0) {
		// Add event listener to every link we find.
		items.each(function (a) {
			Event.observe(a,'mouseover',Information.show,false);
			Event.observe(a,'mouseout',Information.hide,false);
		});
	}
	
	Event.observe($('page'),'click',Information.hideAll,false);
	
	$('SocialBookmarks').show();
	
	$('BookmarkBtn').observe('click', Bookmarks.show, false);
});

SpShop = {
	
	status : 'close',
	
	show : function() {
		
		this.href = '#';
		
		if( SpShop.status == 'close' )
		{
			$('specialshops').show();
			SpShop.status = 'open';
		} else {
			$('specialshops').hide();
			SpShop.status = 'close';
		}
	}
	
};

Information = {
	
	infoBox : null,
	
	show : function() {
		
		Information.infoBox = this.next();
		$(Information.infoBox).show();
		
		Event.observe(
			document,'mousemove',
			Information.position,false
		);
	},
	
	hide : function() {
	   
        if (Information.infoBox) {
            this.next().hide();
    		
            Event.stopObserving(
                document,'mousemove',
                Information.position,false
            );
        }
	},
	
	hideAll : function() {
	   
        items = $$('div.informationalWindow');
        items.each(function (item) {
			item.hide();
		});        
	},
	
	position : function (event) {
		
		if( Information.infoBox )
		{	
			$(Information.infoBox).setStyle({
				top : event.pointerY()-32+'px'
			});
		}		
	}
	
};

Bookmarks = {
    
    show : function() {
        
        if ($('BookmarkPopup').hasClassName('close')) {
            
            $('BookmarkPopup').show();
            $('BookmarkPopup').removeClassName('close');
            $('BookmarkPopup').addClassName('open');
            
        } else {
            
            $('BookmarkPopup').hide();
            $('BookmarkPopup').removeClassName('open');
            $('BookmarkPopup').addClassName('close');
            
        }
        
    }
    
};

-->
