// #TODO: sort out activity indicator nicely - events are a bit of a mess at the moment
var Contact = new Class({
	Implements : [Options,Events],
	options : {
		language : {
			'...Loading...' : '...Loading...',
			'Contact Us' : 'Contact Us'
		}
	},
	l : function(n){
		var text = this.options.language[n];
		if( text ) return text;
		return n+'(translation required)';
	},
	initialize:function(options){
		var that = this;
		this.setOptions(options);
		
	},
	popup_form : function(){
		var pop = new DietDog.ModalPopUp({
			title : this.l('Contact Us'),
			top : 75,
			left : 150,
			width: 600,
			height: 400
		});
		pop.openURL({
			url : "/cart/contact_us.html",
			data : {}
		});
		this.pop_up = pop;
	},
	submit : function(form){
		if(this.pop_up){
			this.pop_up.openURL({
				url : '/cart/contact_us_submit.html',
				data : form.toQueryString()
			});
		}
	}
});
