/* FX.Slide */
/* toggle window for the login section */
/* Works with mootools-release-1.2 */
/* more info at http://demos.mootools.net/Fx.Slide */
window.addEvent('domready', function(){
$('login').setStyle('height','auto');
var mySlide = new Fx.Slide('login').hide(); //starts the panel in closed state
$('toggleLogin').addEvent('click', function(e){
e = new Event(e);
mySlide.toggle();
e.stop();
});
$('closeLogin').addEvent('click', function(e){
e = new Event(e);
mySlide.slideOut();
e.stop();
});
});
dropDownMenu.js
/* Drop Down Menu */
/* Works with mootools-release-1.11.js */
/* script taken at http://dev.visualdrugs.net/mootools/dropdown_menu.html */
Element.extend(
{
hide: function()
{
return this.setStyle('display', 'none');
},
show: function()
{
return this.setStyle('display', 'block');
}
});
var DropdownMenu = new Class({
initialize: function(element)
{
$A($(element).childNodes).each(function(el)
{
if(el.nodeName.toLowerCase() == 'li')
{
$A($(el).childNodes).each(function(el2)
{
if(el2.nodeName.toLowerCase() == 'ul')
{
$(el2).hide();
el.addEvent('mouseover', function()
{
el2.show();
return false;
});
el.addEvent('mouseout', function()
{
el2.hide();
});
new DropdownMenu(el2);
}
});
}
});
return this;
}
});
Window.onDomReady(function() {
new DropdownMenu($('nav'))
});