$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
    
    /*
    $('#nav span').hover( function(){
    	var submenu_id = $(this).attr('submenu-id');
    	
    	$('#submenu-wrapper div').hide();
    	$('#' + submenu_id ).show();
    
    });
    */

    $("#nav span").hoverIntent({    
    	over: function(){
    		var submenu_id = $(this).attr('submenu-id');
	    	if(submenu_id) {
	    		$('#submenu-wrapper').show();
	    		$('#submenu-wrapper div').hide();
	    		$('#' + submenu_id ).show();
	    	} else {
	    		$('#submenu-wrapper').hide();
	    		$('#submenu-wrapper div').hide();
	    	}
		}, // function = onMouseOver callback (REQUIRED)    
		timeout: 500, // number = milliseconds delay before onMouseOut    
		out: function() {} // function = onMouseOut callback (REQUIRED)
    });
    
    $('#main-menu-wrapper').hoverIntent({
    	over: function(){},
    	timeout: 500,
    	out:  function(){
    		$('#submenu-wrapper').hide();
    	}
    });
    	
    $('#text-larger').click( function() {
    	$('.sizing').each( function() {
    		
    	    var currentFontSize = $(this).css('font-size');
    	    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    	    var newFontSize = currentFontSizeNum*1.2;
    	    $(this).css('font-size', newFontSize);
    	});
    });

    $('#text-smaller').click( function() {
    	$('.sizing').each( function() {	
    	    var currentFontSize = $(this).css('font-size');
    	    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    	    var newFontSize = currentFontSizeNum*.8;
    	    $(this).css('font-size', newFontSize);
    	});
    });
    
});

var out = function(data) {
	if(window.console) {
		console.log(data);
	}
}
