It must not be understood that because the courts of a state constitute the judicial department of the state government they cannot take cognizance of any other law than that found in the constitution and statutes of the state. It is the function of a court to decide cases, and to apply the law governing the case, whatever it may be. Much of the law of any state or nation is so-called unwritten law; that is, it consists of rules and principles not embodied in constitutions or statutes; and if the questions in a case depend for their determination upon rules of unwritten law, it is for the court to decide what those rules are, resorting for that purpose to the principles announced in other cases in the same state, or by courts in other states recognizing the same general system of jurisprudence. Moreover, the federal constitution, treaties, and statutes are the supreme law of the land as to all matters to which they are applicable, and binding upon the judges of the state courts as well as upon the federal judges (Constitution, Art. VI, ¶ 2). And if the determination of a case before a state court involves the application of the federal constitution, treaties, or statutes, it is the duty of that court to make the application and decide the case with reference thereto. The jurisdiction of a state court does not depend upon the kind of law to be administered, but upon the nature of the case itself, and it will hereafter appear that many cases are of such nature that they may be tried either in a state or federal court at the election of one or the other of the parties. (See below, §§ 143, 156-158, 170.)