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

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

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

dict = {
	
	initDefaultContent: function(){
		this.add('comments_name', {
						 fr:"nom",
						 en:"name"
						 });
		this.add('comments_email', {
						 fr:"courriel",
						 en:"email"
						 });
		this.add('comments_msg', {
						 fr:"Votre message...",
						 en:"Your message..."
						 });
	},
	
	
	add: function(mId,mData){
		this._dict.push({id:mId,data:mData});
	},
	
	get: function(mId,mLang){
		if(mLang == null)mLang = this._lang;
		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._lang = (window.lang) ? window.lang : 'fr';
			//---
			this.startUp();
		}
	},
	
	startUp: function(){
		this.initDefaultContent();
	}
};

dict.init();
