Effects of Mg contents on ZnAl 2 O 4 thin films by sol gel method and its application