$(document).ready(function(){

	var config = {    
		sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)    
		interval: 200, // number = milliseconds for onMouseOver polling interval    
		over: expand, // function = onMouseOver callback (REQUIRED)    
		timeout: 500, // number = milliseconds delay before onMouseOut    
		out: minimize // function = onMouseOut callback (REQUIRED)    
	};
	

	$("#portfolio #barnav").hoverIntent(config);
	$("#about #barnav").hoverIntent(config);
	$("#resume #barnav").hoverIntent(config);
	
	

	
	function expand() {  
		$(this).animate({"left": "+=250px"}, { "duration": 800, "easing": "easeOutQuint" });
//		$("div.media").animate({"left": "+=250px"}, { "duration": 800, "easing": "easeOutQuint" });
	}
	function minimize(){ 
		$(this).animate({"left": "-=250px"}, { "duration": 390, "easing": "easeInQuart" });
//		$("div.media").animate({"left": "-=250px"}, { "duration": 390, "easing": "easeInQuart" });
		
	}
	
	$('#slideshow').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 0,
        next:   '#next', 
		  prev:   '#prev',
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#nav li:eq(' + (idx) + ') a';
        }
    });
	
	$('.media').media({
		width:	870,
		height: 660,
		autoplay: 1
	});
	
	$('.swfmedia1').media({ 
    width:     870, 
    height:    350 
	}); 
	
	$('.swfmedia2').media({ 
    width:     300, 
    height:    350 
	}); 
	
	$('.swfmedia3').media({ 
    width:     320, 
    height:    600 
	}); 

	$('.swfmedia3-1').media({ 
    width:     300, 
    height:    600 
	}); 	
	
	$('.swfmedia4').media({ 
    width:     500, 
    height:    300 
	}); 			
	
});



