/*--------------------------------------------------------------

__  __ `__ \  _ \  ___/  __ `/_  __ \  __ \
_  / / / / /  __/ /__ / /_/ /_  / / / /_/ /
/_/ /_/ /_/\___/\___/ \__,_/ /_/ /_/\____/

--------------------------------------------------------------*/

dict = {
	
	initDefaultContent: function(){
		this.add('msg_mailling_email_empty',{
						 fr: "Veuillez entrer votre courriel",
						 en: "Please enter your email"
						 });
		this.add('msg_mailling_email_bad',{
						 fr: "Courriel invalide",
						 en: "Invalid email"
						 });
		this.add('msg_mailling_success',{
						 fr: "Merci ! On vous tient au courant",
						 en: "Thanks! We'll keep you posted"
						 });
		this.add('comments_name', {
						 fr:"Votre nom",
						 en:"Your name"
						 });
		this.add('comments_email', {
						 fr:"Votre courriel",
						 en:"Your email"
						 });
		this.add('comments_msg', {
						 fr:"Votre message",
						 en:"Your message"
						 });
		this.add('contact_name', {
						 fr:"Votre nom",
						 en:"Your name"
						 });
		this.add('contact_email', {
						 fr:"Votre courriel",
						 en:"Your email"
						 });
		this.add('contact_company', {
						 fr:"Votre compagnie",
						 en:"Your company"
						 });
		this.add('contact_msg', {
						 fr:"Exprimez-vous...",
						 en:"Express yourself..."
						 });	
	},
	
	
	add: function(mId,mData){
		this._dict.push({id:mId,data:mData});
	},
	
	get: function(mId,mLang){
		if(mLang == null)mLang = 'en';
		var ar = this._dict;
		var lg = ar.length;
		for(var i=0;i<lg;i++){
			if(ar[i].id == mId) return ar[i].data[mLang];
		}
	},
		
	
	/* Mulitusage
	--------------------------------------------------------------*/
	empty: function(){},
	
	
	/* Main initiation function
	--------------------------------------------------------------*/
	init: function(){
		if(this._INIT == null){
			this._INIT = true;
			//---
			this._dict = [];
			//---
			this.startUp();
		}
	},
	
	startUp: function(){
		this.initDefaultContent();
	}
};

dict.init();
