OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
		defaultHandlerOptions: {
			'single': true,
			'double': true,
			'pixelTolerance': 0,
			'stopSingle': false,
		 	'stopDouble': true
			},
		initialize: function(options) {
			this.handlerOptions = OpenLayers.Util.extend({}, this.defaultHandlerOptions);
			 OpenLayers.Control.prototype.initialize.apply(this, arguments);
			this.handler = new OpenLayers.Handler.Click(this, {'click': this.triggerClick,'dblclick':this.triggerdbl}, this.handlerOptions);
			},
			triggerClick: function(e) {
				zoom_level = map.getZoom();
				if (zoom_level > 6){
					var lonlat = map.getLonLatFromViewPortPx(e.xy);
					var load = "<p style='width: 300px; height: 100px;'><center><img src='/static/mzs/img/load.gif' /></center></p>";
					map.addPopup(new OpenLayers.Popup.FramedCloud(
		                			"identified", 
		                			map.getLonLatFromViewPortPx(e.xy),
                                                        //added size on 12/07/11
		                			new OpenLayers.Size(400, 400),
		                			load,
		                			null,
		                			true
		            				), true);
					$.get('/muziris/identify/', {x: lonlat.lon, y: lonlat.lat}, function(data){
						$("#identified_contentDiv").html(data);
						/*map.addPopup(new OpenLayers.Popup.FramedCloud(
		                			"identified", 
		                			map.getLonLatFromViewPortPx(e.xy),
                                                        //added size on 12/07/11
		                			new OpenLayers.Size(300,200),
		                			data,
		                			null,
		                			true
		            				), true);*/
                                                
						$("#tabs").tabs();
						});
					}
				
				},
			triggerdbl:function(e){
				return;
				},
			CLASS_NAME:"OpenLayers.Control.Click"
		});

