
var VzdnDocument = new Class({
	
	ua : "",
	isPC  : false,
	isIOS : false,
	

	//----------------------------------------------------------------------------------------------------
	//initialize
	
	initialize : function() {
		this.ua = navigator.userAgent;
		if(this.ua.toLowerCase().match("windows")) {
			$(document.body).addClass("windows");
		}
		
		var platform = navigator.platform;
		
		this.isPC = Boolean(platform.match(/^(Mac|Win).*/));
		this.isIOS = Boolean(navigator.platform.match(/iPad|iPod|iPhone/));
	},
	
	
	
	scrollToTop : function() {
		var fx = new Fx.Scroll($(document.body), {wheelStops: true, duration:500, transition: Fx.Transitions.Sine.easeOut});
		fx.toTop();
	},


	
	
	
	writeScrollOffset : function() {
		var host = location.hostname;
		var offset = document.body.scrollTop  || document.documentElement.scrollTop;
		Cookie.write("offset", offset, {domain: host, path: "/"});
	},
	
	
	readScrollOffset : function() {
		var host = location.hostname;
		if(!document.referrer.match(host)) {
			Cookie.dispose("offset", {domain: host, path: "/"});
			return "";
		}
		var data = Cookie.read("offset");
		return data;
	},
	
	
	disposeAllData : function() {
		var host = location.hostname;
		Cookie.dispose("page",   {domain: host, path: "/"});
		Cookie.dispose("offset", {domain: host, path: "/"});
	}
	
	
});









