var CountryPage = new Class({

  _jsonRequest : Class.empty,
  _country_iframe : '',
  _country_url : '',


    /*
     * initialize
     */
    initialize: function( country_iframe, country_code ) {
        this._country_iframe =  $(country_iframe);
        //init json...
        this._jsonRequest = new Json.Remote('/sbeos/ajax/JsonCall.php', {onComplete: this.retrievedData.bind(this)});
        this._jsonRequest.send({'action':'DestinationCountry', 'country_code': country_code});
    },

    /**
     * onComplete handler for json request
     *
     * @param {Object} jsonObj
     */
    retrievedData: function(jsonObj) {
        if (jsonObj.success == true) {
            //replace previous country
            this._country_iframe.src = jsonObj.country_url;
        }
    }
});
