"The mosques to which medreses were attached, dominated the social life in Ottoman cities