// full screen mode
(function () {
	// remove meta elements with the same name, then add a new meta element
	function meta(n, c) {
		var d = document,
			h = d.getElementsByTagName('head')[0], // head element
			ms, // list of meta elements
			m, // meta element
			i; // counter

		if (!h) {
			return;
		}

		ms = h.getElementsByTagName('meta');

		// remove other matching elements
		for (i = ms.length - 1; i >= 0; i--) {
			m = ms[i];
			if (m.name == n) {
				h.removeChild(m);
			}
		}

		// add our element
		m = d.createElement('meta');
		m.name = n;
		m.content = c;
		h.appendChild(m);
	}

	meta('apple-mobile-web-app-capable', 'yes');
	// this doesn't quite work as expected yet
	//meta('apple-mobile-web-app-status-bar-style', 'black-translucent');
})()
