var toggleOmatic = function() {
	var toggleAll = $(document.body).getElements('[class$=_toggle]');
	toggleAll.each(function(item){
		item.setStyle('cursor', 'pointer');
		var toggleAllClass = item.getProperty('class');
		toggleAllClass = toggleAllClass.replace("_toggle", "");
		var slideAllClass = toggleAllClass + "_slide";
		var slideAll = $(document.body).getElements('.' + slideAllClass);
		slideAll.slide('hide');
		$(item).addEvent('click', function(){
				slideAll.slide();
		});
	});
} 
var addyBox = function() {
$$(".button").addEvent("click",function(){
this.getParent(".package").getElement(".form").addClass("bottomForm").removeClass("topForm");
showAddressBox.bind(this)();
});
$$(".head").addEvent("click",function(){
this.getParent(".package").getElement(".form").addClass("topForm").removeClass("bottomForm");
showAddressBox.bind(this)();
});
$$(".closeAddy").addEvent("click",closeAddressBox);
}
var showAddressBox1 = function() {
this.getParent(".package").getElement(".form").setStyles("display","block","bottom","20px").fade("hide").fade("in");
}
var showAddressBox = function() {
this.getParent(".package").getElement(".form").setStyle("display","block").fade("hide").fade("in");
//this.getParent(".package").getElement(".whiteout").setStyle("display","block").fade("hide").fade("in");
this.getParent(".package").getElement(".fade").setStyle("opacity",".4)");
} 
var closeAddressBox = function() {
this.getParent(".package").getElement(".form").fade("out");
this.getParent(".package").getElement(".fade").setStyle("opacity","1)");
//this.getParent(".package").getElement(".whiteout").fade("out");
} 