// JavaScript Document
YUI().use('node', function(Y) {
	
	/**
	 * function to set background image according to screen resolution
	 * @access public
	 */
	var setBackground = function(e) {
		
		// set vars
		var b = Y.one(document.body);
		var w = screen.width;
		var h = screen.height;

		var size = new Array();
		size.push({width:800,height:600});
		size.push({width:1024,height:768});
		size.push({width:1152,height:864});
		size.push({width:1280,height:720});
		size.push({width:1280,height:768});
		size.push({width:1280,height:800});
		size.push({width:1280,height:960});
		size.push({width:1280,height:1024});
		size.push({width:1360,height:768});
		size.push({width:1400,height:1050});
		size.push({width:1440,height:900});
		size.push({width:1600,height:900});
		size.push({width:1680,height:1050});
		size.push({width:1920,height:1080});	

		// set styles
		b.setStyle('backgroundImage', 'url(images/background_'+w+'.jpg)');
		b.setStyle('backgroundPosition', 'center');
		b.setStyle('backgroundAttachment', 'fixed');

	};
	
	Y.on('domready', setBackground, window, Y);
});
