Ext.define("IceCap.util.Breakout", {

	alternateClassName: [
		"IceCap.breakout"
	],

	singleton: true,

	constructor: function(o_config) {

		var i_self = this;
		i_self.initConfig(o_config);
	},

	googleMap: function(o_data) {

		var i_self = this;

		o_data = o_data || {};

		if (s_title.toLowerCase() == "work with customers") {

			var s_url = "http://www.icebreak.org/geoCoding.html";

			var o_params = {
				address: "dk" + o_data.c5 + "," + o_data.c4
			};

			s_url = s_url + "?" + Ext.Object.toQueryString(o_params);

			Ext.GlobalEvents.fireEvent(i_self, "onAddWebContainer", {
				url: s_url
			});
		}
	},

	krak: function(o_data) {

		var i_self = this;

		o_data = o_data || {};

		if (s_title.toLowerCase() == 'work with customers') {

			var s_url = 'http://www.krak.dk/'
					+ o_data.c3.replace(' ', '+')
					+ '/'
					+ o_data.c4.replace(' ', '+')
					+ '+'
					+ o_data.c5
					+ '/søg.cs';

			Ext.GlobalEvents.fireEvent(i_self, "onAddWebContainer", {
				url: s_url
			});
		}
	}
});
