Plot thickens but it makes complete sense. Erdogan is using ISIS to expand Turkish clout in the region at the expense of Iran. ISIS also serves a role in fighting the Kurds who are of course a thorn in Turkey's side as well. Remember that ISIS wants to recreate the caliphate of yesteryear which was basically represented by the Ottoman Turks for the latter part of the last millennium. Modern Turkey is the successor to the Ottoman and it wouldn't surprise me if Erdogan has ambitions in this regard. His policies towards Israel clearly indicate that he intends to lead the Sunni vanguard against the Jewish state (Iran is responsible for the Shi'ite effort) which is always a useful strategy to unite Muslim voices. He will joust with the Gulf State on this issue but he has more of a military footprint. An immediate problem for now is that Turkey is a NATO member (legacy of the Cold War). It is therefore in the best interests of the West that Turkey be booted from this organization (or at least pushed to the sidelines). The country is not aligned with Western interests which is ultimately what NATO stands for.