function GControlStreetViewPegman(){
}
GControlStreetViewPegman.prototype = new GControl();
GControlStreetViewPegman.prototype.initialize = function(map){
	var container = $("<div class=\"control pegman\"></div>").get(0);
	$(container).css();
	map._custom.listeners.pegmanControlMouseDown = GEvent.addDomListener(container,"mousedown",function(){
		map._custom.listeners.pegmanControlMouseUp = GEvent.addDomListener(container,"mouseup",function(){
			GEvent.removeListener(map._custom.listeners.pegmanControlMouseOut);
			GEvent.removeListener(map._custom.listeners.pegmanControlMouseUp);
		});
		map._custom.listeners.pegmanControlMouseOut = GEvent.addDomListener(container,"mouseout",function(){
			map._custom.listeners.mapMouseMove = GEvent.addListener(map,"mousemove",function(){
				map._custom.streetView.pegman.setLatLng(arguments[0]);
				GEvent.trigger(map._custom.streetView.pegman,"drag",arguments[0]);
			});
			$(map.getContainer()).bind("mouseup",function(event){
				GEvent.removeListener(map._custom.listeners.pegmanControlMouseOut);
				GEvent.removeListener(map._custom.listeners.pegmanControlMouseUp);
				GEvent.removeListener(map._custom.listeners.mapMouseMove);
				$(this).unbind("mouseup");
				GEvent.trigger(map._custom.streetView.pegman,"dragend",map.fromContainerPixelToLatLng(new GPoint(arguments[0].pageX - arguments[0].currentTarget.offsetLeft,arguments[0].pageY - arguments[0].currentTarget.offsetTop)));
			});
			map._custom.streetView.pegman.show();
			GEvent.trigger(map._custom.streetView.pegman,"mousedown",map.fromContainerPixelToLatLng(new GPoint(arguments[0].target.offsetWidth + arguments[0].target.offsetLeft,arguments[0].target.offsetHeight + arguments[0].target.offsetTop)));
			GEvent.trigger(map._custom.streetView.pegman,"dragstart",map.fromContainerPixelToLatLng(new GPoint(arguments[0].target.offsetWidth + arguments[0].target.offsetLeft,arguments[0].target.offsetHeight + arguments[0].target.offsetTop)));
		});
	});
	map.getContainer().appendChild(container);
	return(container);
}
GControlStreetViewPegman.prototype.getDefaultPosition = function(){
	return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(9,58));
}
