// DOMREADY
$(document).ready(function() {
						   
	// SIZE
	resize();
	
	// PLAY
	setTimeout('setInterval(\'interval();\',5000);',5000);
	
	// FANCYBOX
	$(".fancybox").fancybox();
	
	// CYCLE
	$('.slideshow').cycle({
	fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});

});

// RESIZE
$(window).resize(function() {
	
	// SIZE
	resize();
	
});

// SIZE
function resize() {
	
	// DEVICES
	if ('innerHeight' in window) { // standard
		var screenwidth = (window.innerWidth<screen.width) ? window.innerWidth : screen.width;
		var screenheight = (window.innerHeight<screen.height) ? window.innerHeight : screen.height;
	} else { // ie678
		var screenwidth = document.documentElement.clientWidth;
		var screenheight = document.documentElement.clientHeight;
	}
	var screentype = 'desktop';
	var screensize = 'small';
	if (screenwidth<850) {
		screenwidth = 850;
		screentype = 'mobile';
		screensize = 'mobile';
	} else if (screenwidth<1150) {
		screentype = 'desktop';
		screensize = 'small';
	} else if (screenwidth<1450) {
		screentype = 'desktop';
		screensize = 'medium';
	} else if (screenwidth<1750) {
		screentype = 'desktop';
		screensize = 'large';
	} else {
		screentype = 'desktop';
		screensize = 'hd';
	}
	$('body').height(screenheight);
	$('body').width(screenwidth);
	$('body').attr('class',$('body').attr('class')+' '+screentype+' '+screensize);
	
	// RESIZE
	$('body').width(screenwidth-300);
	$('#page_left').height(screenheight);
	
}

// INTERVAL
function interval($args) {
	//$('.message').fadeOut('slow');
}

// DEVICES
//document.write('<div class="message statusbar">window '+ window.innerWidth +'px / screen '+ screen.width +'px</div>');

