Castles such as this one: http://i.imgur.com/lAWPFkZ.jpg and others built on cliffs next to seas with sheer drops into the waters.
Add on question- does anyone know if the same mortar was used as with the rest of the stones or if it was a special blend to take into consideration the potentially different material.
This Castle is the "Castillo de Monteagudo" in Murcia in Spain.
It was built by the Muslims when they ruled Spain. It was first mentioned in about 1078. After the reconquista, it was an important border fortress between Castille and Aragon. It seems to have been a palace (at some times) as well as a fortress.
The castle was a great and obviously expensive construction. It incorporated several great cisterns to collect water so the castle had a water supply in case of siege.
This source:
http://digital.csic.es/bitstream/10261/13091/1/37.pdf
looks like it gives some pretty detailed descriptions of the construction, if you can read Spanish.
OP, what castle is that? I really want to go see it.