	function MM_openBrWindow(theURL,winName,w,h,scrollbars) 
	{ 
	  LeftPosition=(screen.width)?(screen.width-w)/2:100;
	  TopPosition=(screen.height)?(screen.height-h)/2:100;
	  
	  settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbars+',location=no,directories=no,status=0,menubar=no,toolbar=no,resizable=no';
	  URL = theURL;
	  window.open(URL,winName,settings);
	}

window.addEvent("domready", function() {
	$$("ul.images a").slimbox({
		loop: true,
		initialWidth: 1024,
		initialHeight: 768,
		overlayOpacity: 0.7,
		overlayFadeDuration: 250,
		resizeDuration: 1000,
		resizeTransition: Fx.Transitions.Cubic.easeInOut
	});
                // navigation

     $$("ul#nav a").addEvents({
    'mouseover': function(){
if(this.getParent().getNext()) this.getParent().getNext().addClass('neighbourActive');
    },
    'mouseleave': function(){
if(this.getParent().getNext()) this.getParent().getNext().removeClass('neighbourActive');
    }
        });

		//slider variables for making things easier below
		var itemsHolder = $('sliderdiv');
		var myItems = $$(itemsHolder.getElements('.item'));
		
		//controls for slider
		var theControls = $('controls1');
		var thePrevBtn = $(theControls.getElement('.prev_btn'));
		var theNextBtn = $(theControls.getElement('.next_btn'));
		
		//create instance of the slider, and start it up		
		var mySlider = new SL_Slider({
			slideTimer: 6000,
			orientation: 'vertical',      //vertical, horizontal, or none: None will create a fading in/out transition.
			fade: true,                    //if true will fade the outgoing slide - only used if orientation is != None
			isPaused: true,
			container: itemsHolder,
			items: myItems,
			prevBtn: thePrevBtn,
			nextBtn: theNextBtn
		});
		mySlider.start();
		
		//adding a little animated rollover highlight to the play and prev/next buttons
		var origBkgdColor = "#FFFFFF"; //theNextBtn.getStyle('background-color');
		var newBkgdColor = "#333333";
		var btnArray = new Array(thePrevBtn, theNextBtn);
		
		btnArray.each(function(e, i){
			e.set('tween', {duration: 350, transition: 'cubic:out', link: 'cancel'});
			e.addEvents({ 
				'mouseenter' : function() {
					this.tween('background-color', newBkgdColor);
				},
				'mouseleave' : function() {
					this.tween('background-color', origBkgdColor);
				}
			});
		});

});

