/**
 * ...
 * @author Matthieu Chavigny
 */
isFlashPage=true;
$(function() {
	if(!isIos) {
		$("body").append('<div id="selectversion"><img src="/img/rvb/selectversion.png" alt=""/></div><div class="sv_html"></div><div class="sv_flash"></div>');
		$("#selectversion").css("height", 40);
		$("#selectversion, .sv_html, .sv_flash").css("position", "fixed");
		$("#selectversion").css("bottom", 0);
		$("#selectversion div").css("position", "relative");
		$(".sv_html, .sv_flash, #selectversion").css("z-index", 20);;
		$(".sv_html, .sv_flash").css("width", 36);
		$(".sv_html, .sv_flash").css("height", 17);
		$(".sv_html, .sv_flash").css("bottom", 4);
		$(".sv_html, .sv_flash").css("z-index", 20);
		$(".sv_html").css("left", 16);
		$(".sv_flash").css("left", 55);
		if(getvars.v=="html"||readCookie("ts_version")=="html") {
			$(".sv_html").css("border", "1px solid #ccc");
			$(".sv_flash").css("cursor", "pointer");
			$(".sv_flash").click(function() {
				createCookie("ts_version", "false", 100);
				window.location.reload();
			});
		}
		else {
			$(".sv_flash").css("border", "1px solid #ccc");
			$(".sv_html").css("cursor", "pointer");
			$(".sv_html").click(function() {
				createCookie("ts_version", "html", 100);
				window.location.reload();
			});
		
			// Replace Collections action
			$("li.link3 a").click(function(e) {
				e.preventDefault();
				getFlash().clickCollections();
			});
		}
		
	}
	
});
