$(function() {
	resize();
	$( window ).wresize( resize ); 
	$.fn.supersized.options = {  
		startwidth: 1000,  
		startheight: 600,
		vertical_center: 0,
		slideshow: 1,
		navigation: 0,
		transition: 1, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
		pause_hover: 0,
		slide_counter: 0,
		slide_captions: 0,
		slide_interval: 5000  
	};
    $('#supersize').supersized(); 
	$('#scroll').scrollbarPaper( );
    $('form input.help, form textarea.help').formtips({
        tippedClass: 'tipped'
    });
});

function resize()
{
	var mainObject = $('#content #main');
	var scrollObject = $('#scroll');
	var windowWidth = $( window ).width();
	var windowHeight = $( window ).height();
	mainObject.css( { width: Math.max( windowWidth - 335, 665 ), height: Math.max( windowHeight - 180, 420 ) } );
	scrollObject.css( { width: Math.max( windowWidth - 335, 665 ), height: Math.max( windowHeight - 200, 400 ) } );
	$('#scroll').scrollbarPaper( );
    $('.corner').corner( {  antiAlias: false } );
    $('form#contact').validationEngine();
    $('form#experience').validationEngine();
    $('form#apply').validationEngine();
}

