var SignUp =  {
	container: null,
	
	init: function(){
		SignUp.container = $('div.container');

        //set the country in the contact me section from geoIP
		SignUp.container.find('table.signUp select[name="Country"]').find('option[value="' + AppData.GEOIPCountry + '"]').attr('selected','selected');

		SignUp.container.find('#country').selectbox(
				{
					inputClass: 'selectboxBigLong',
					containerClass: 'selectbox-wrapperBigLong',
					scrollBar: true,
					hoverClass: 'selectHover',
                    onChange: function( name, value, element ) {
						$.post(
							'rpcProxy/getCountryPrefix',
							{countryId: value},
							function(data){
							if (data!=null){
								General.container.find('table.signUp input.phonePrefixInput').val(data);
							}
							else{
								General.container.find('table.signUp input.phonePrefixInput').val('');
							}
						},
					'json');
					}
				}
		)

		SignUp.container.find('#currency').selectbox(
				{
					inputClass: 'selectboxBigLong',
					containerClass: 'selectbox-wrapperShort',
					scrollBar: true,
					hoverClass: 'selectHover'
                                        
				}
		);
		
		//SignUp.container.find('div.terms div').jScrollPane({showArrows:true, scrollbarWidth: 16, arrowSize: 16});
        SignUp.container.find('a.linkToTerms').click(function(event){
            General.dialog( SignUp.container.find('#termsOfUseContainer div').clone() , 'Terms Of Use', {height:'500', width:'700px'});
            event.preventDefault();
    })
      },

	  /**
	*	every change of time value (Lightstreamer)
	*	we call to 'onUpdateTime' function
	*
	**/
	onUpdateTime: function() {
		
	}
}
$(document).ready(function() { 
	SignUp.init();
}); 

