Now to get back to Croatian identity. The first recorded mention of an individual (that is not a noble) stating for himself that he is a Croat (what ever that ment for him) comes from early 17th century from the region called Vinodol, south of Rijeka/Fiume. At the moment I do not remember the name of the person and the book is at the university library but he was a so called glagolitic priest. These were the priest that conduced the mass in the local language (rather than latin) and wrote in glagolitic script rather than latin script. The second and third mention come also from the same region and than spread to the venetain controled islands of Krk and Cres. It is important that this early indentification is quite probably connceted with the distribution of glagolitic priest in the region. By the late 17th century the coast is firmly aware of their Croat identity and some people in the inland centres such as Zagreb, Karlovac and Varazdin also start identifying themselves as Croats. The identity of the nobility was never in question since their political position came out of indentify themselves as Croats, though to many it was a supreficial name used for political gains.
That is very interesting. Here's how I understand it. The Medieval language of Croatia and Croats was the Cakavian dialect. Hungary absorbed Croatia in 1102, however due to the Pacta Conventa the Croatian nobility retained certain rights and therefore preserved the Croatian language continued with Cakavian. What changed was when the Turks came to the Balkans and defeated Croatia/Hungary a the battle of Mohacs in 1557 (i think?) after that both Hungary and Croatia were absorbed into Habsburg Austria. However the defeat by Hungary/Croatia to the Croats and the expansion of the Turks on the Croatian territory in the Balkans led to a huge flight in the population of Croats North into Austria and West into neighbornig Venice where the last remnants of the Cakavian language were preserved in places like Istria and the coastal islands under Venetian control. However, when the Habsburgs absborbed Hungary and Croatia they transferred the Croat nobility to the Westernmost parts of the Empire in today's Zagreb/Varazdin/Krizevci district. Here the Croat nobility then imposed a Croatian identity on the majority Kajkavian (Slovene) speakers of the area. That is why in the 19th century you found Cakavian and Kajkavian speakers who, despite speaking two varying dialects, one Slovenian and one Croatian, nevertheless both identified as Croats.
This theory has a couple of assumptions. First, it assumes that the language of the elite in medieval Croatia and the language of the everyday peasantry was one in the same: Cakavian. We know that the documents of medieval Croatia were written in the Cakavian lnaguage which may suggest that the kingdom's inhabitants spoke the same lanugage, but this is not necessarily a given. Secondly, it assumes that today's Slovenes were originally descedants of Czechs and Slovaks and a part of Great Moravia, until the Hungarian invasion of the Pannonian plane divided the Northern Slavs, Czechs and Slovaks from their southern counterparts Slovenes.
Note* it would be interesting for anyone who has knowledge of linguistics to determine how closely related Slovene is to Czech and Slovak. I'm Serbo-Croatian and can say that I find Slovene very difficult to understand and wouldn't say I understand it any better than Czech and Slovak. So maybe it be interesting to see whether Slovene is closer to Czech or Slovak than it is to Serbian/Croatian.
An alternative theory, is that language of the elites in medieval Croatia was not in fact identical to the language of the local inhabitants. This theory rejects the notion that Slovenes are descedants of Czechs and Slovaks. Instead it argues that while the elite language may have been Cakavian in medieval Croatia, the language of the everyday inhabitants was actually more akin to today's Kajkavian. When the Turks invaded Croatia and the constant Turkish wars in the Balkans in the 15th 16th and 17th centuries caused the majority of Croats to flee toward neighboring Austria in the mountainous regions of today's Slovenia to seek refuge from the Turks. So the people that today consider themselves Slovene are in fact the real descedants of Croats who migrated North into Habsurg Austria after Hungary/Croatia were absorbed into the Ottoman Empire
I find this theory very interesting, because we know for instance with the Serbian population that it was concentrated much further South in today's Macedonia and Kosovo in the middle ages yet the expansion of the Ottomans caused a huge northern migration of Serbs to areas that are today Vojvodina, Bosnia, Dalmatia Slavonia etc. So if we know that Serbs migrated North to flee the Ottomans and spread the Stokavian language onto these new areas, it is entirely possible that Croats did the same and migrated north into areas of today's Slovenia escaping the Turks. We also know that the language of the elites in medieval Serbia "staro-srpski" has changed and was not spoken by Serbs by the 19th century who spoke Stokavian. The same could have happened to the Croats, where their medieval language was cakavian but after centuries the language evolved into Kajkavian.
A good way to settle this is to determine whether today's Slovenian/Kajkavian language is closer to Cakavian as a language or closer to Czech/Slovak. If Slovenian is closer to Czechoslovak that would imply support for the first theory while if Slovenian is closer to Cakavian than that could imply support for the second theory