var graf = {

	openWindow : function(elm) {
		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		//Set heigth and width to mask to fill up the whole screen
		$('#mask').css({'width':maskWidth,'height':maskHeight});
		
		//transition effect		
		$('#mask').fadeIn(100);	
		$('#mask').fadeTo("slow",0.3);	
	
		var dimensions = {'width': elm.width(), 'height': elm.height()};
	
		var top = ($(window).scrollTop() + Math.round(($(window).height() - dimensions.height) / 2)) + 'px';
		var left = Math.round(($(window).width() - dimensions.width) / 2) + 'px';
			  
		elm.css('top',  top);
		elm.css('left', left);
	
		//transition effect
		elm.fadeIn(100); 
	},

	move_gradation : function(e) {
		var interval = 50;
	
		var x = e.clientX;
		var width = $(window).width();
	
		var center = width / 2;
		var point = x / interval;
	
		var left = ( interval * ( Math.floor(point)) ) - center;
	
		$('#container').css('background-position', left+'px 0px');
 	}
}

//$(document).mousemove(function(e){
//	graf.move_gradation(e);
//});

