/*
var aCorner = {
	tl : null, tr : null, bl : null, br : null,
	t: null, b: null, l: null, r: null,
	
	init : function() {	
		this.tl = new Element('div', {class:'corner'});
		
		this.tr = this.tl.clone().setStyles({
			'background-image': 'c_tr.jpg',
			top: 0,
			right: 0
		});
		
		this.bl = this.tl.clone().setStyles({
			'background-image': 'c_bl.jpg',
			bottom: 0,
			left: 0
		});
		
		this.br = this.tl.clone().setStyles({
			'background-image': 'c_br.jpg',
			bottom: 0,
			right: 0
		});
		
		this.tr.setStyles({
			'background-image': 'c_tl.jpg',
			top: 0,
			left: 0
		});
		
		this.t = new Element('div', {class:'corner_h'});
		this.b = this.t.clone();
		this.l = new Element('div', {class:'corner_v'});
		this.r = this.l.clone();
	},
		
	cornerize : function() {
		$$('.rcorners').each(function (item) {
			if (!item.getStyle('position') ==  'absolute') item.setStyle('position', 'relative');
			item.adopt([this.tr, this.tl, this.bl, this.br]);
		});
		
	}
};
*/

window.addEvent('domready', function() {

	$('wrap').style.background = 'url(/img/skyloop.jpg) 0 0 repeat-x';
	
	var wrapFun = function() {
		++this.wr.bgpos;
		this.wr.style.backgroundPosition = ++this.wr.bgpos + 'px 0px';
	}
	wrapFun.wr = $('wrap');
	wrapFun.wr.bgpos = 0;
	wrapFun.periodical(50, wrapFun);
	
	var tmp = new Element('div', {
		styles: {
			color: '#fff',
			position: 'absolute',
			top: '-2px',
			left: '-2px',
			'white-space': 'nowrap',
			cursor: 'default'
		}
	
	}).set('html', $('contacts').innerHTML);
	
	$('contacts').adopt(tmp);
	$('contacts').style.color = '#000';
	
	window.addEvent('resize', function() {
		var defheight = 480;
		
		var prop = 'min-height';
		if (Browser.Engine.trident4) { //ie6
			prop = 'height';
		}
		
		$('center').setStyle(prop, defheight);
		
		
		nil = window.getScrollSize().y - $('wrap').getSize().y;
				
		$('center').setStyle(prop, nil + defheight);
		
	});
	window.fireEvent('resize');
	
	
	if (Browser.Engine.trident4) {
		trid_resize = function() {
			window.fireEvent('resize');
		}
		trid_resize.periodical(1000);
	}
	
	
});
