window.addEvent("domready", function(){
	//var links = $$("a");
	new SmoothScroll();
	new Lightbox();
	new Tips($$(".tooltip"), { "offsets":{ "x":-0, "y":-130 } });

$$(".volatile").each(function(el){
		$(el).addEvent("focus", function(){
			if(this.getValue() == this.getProperty("title")) {
				this.value = "";
			}
		});
	});

	if($("customOptions")) {
		var customOptions = new Fx.Slide("customForm",{ "duration":1200, "transition": Fx.Transitions.Bounce.easeOut });
		customOptions.hide();
		$("customOptions").addEvent("click", function(e){
			new Event(e).stop();
			customOptions.toggle();
		});
	}

	if($("ratingOptions")) {
		var ratingOptions = new Fx.Slide("ratingForm",{ "duration":1200, "transition": Fx.Transitions.Bounce.easeOut });
		ratingOptions.hide();
		$("ratingOptions").addEvent("click", function(e){
			new Event(e).stop();
			ratingOptions.toggle();
		});
	}

	$$("a[rel*='external']").each(function(a){ 
		$(a).setProperty("target", "_blank");
	});

	var myCarousel = new Carousel($("galleryCarousel"), { 
		autoStyle:true,
		idPrevious:$("previousImage"),
		idNext:$("nextImage"),
		visibleItems: 4, //amount that fits in the container
		scrollAmount: 130, //how wide each item is
		scrollInterval: 500, //how quick it should scroll in ms
		fxTransition: Fx.Transitions.quadOut //http://docs.mootools.net/Effects/Fx-Transitions.js <- pick one
	});

	$$("#galleryCarousel").each(function(el){
		new ListItemSelector($(el),{ "fxMin": 1, "fxMax": 0.5 });
	});

	
	$$(".fadein").each(function(el){
		new ListItemSelector($(el),{ "fxMin": 0.5, "fxMax": 1 });
	});
		
	$$(".breadbasket a").each(function(el){
		new ListItemSelector($(el),{ "fxMin": 1, "fxMax": 0.5 });
	});	
	
	new Accordion($$(".quicklinks li h3"), $$(".quicklinks li div"), { "alwaysHide":true, "show":-1 });
	
	new Accordion($$(".faqlist li h3"), $$(".faqlist li div"), { "alwaysHide":true, "show":-1 });
	

	var showFormIndex = -1;
	
	if($("addressforms")){
		$("addressforms").getElements("li").each(function(el,index){
			if(el.hasClass("show_address")){
				showFormIndex = index;
			}
		});
	}

	new Accordion($$(".formopen"), $$(".addressforms li"), { "alwaysHide":true, "show":showFormIndex });

	
	
/* add stuff between here */
/*
	var flash = new FlashObject("FLASH_SRC", "REPLACEMENT_ID_NAME", "WIDTH", "HEIGHT", "FLASH_VERSION", "BGCOLOR");
	flash.addParam("menu","false");
	flash.addParam("quality","high");
	flash.write("YOUR_DIV_ID_GOES_HERE");
*/

/* and here */

});

window.addEvent("load", function(){



});