Ljubljana Castle ("Ljubljanski grad") is a medieval castle with Romanesque, Gothic, and Renaissance architectural elements, located on the summit of Castle Hill, which dominates the city centre. The area surrounding today's castle has been continuously inhabited since 1200 BC. The castle was built in the 12th century and was a residence of the Margraves, later the Dukes of Carniola. The castle's Viewing Tower dates to 1848; this was manned by a guard whose duty it was to fire cannons warning the city in case of fire or announcing important visitors or events, a function the castle still holds today. Cultural events and weddings also take place there. Since 2006, a funicular has linked the city centre to the castle atop the hill.