// JavaScript Document
// jQuery.noConflict();
jQuery(document).ready(function ($) {
								 
	//$("#featured_work_caption").hide();

	/* navigation */
	
    $(function () {
        if ($.browser.msie && $.browser.version < 7) return;
        
        $('#navigation li')
            .removeClass('highlight')
            .find('a')
            .append('<span class="hover" />').each(function () {
                    var $span = $('> span.hover', this).css('opacity', 0);
                    $(this).hover(function () {
                        // on hover
                        $span.stop().fadeTo(300, 1);
                    }, function () {
                        // off hover
                        $span.stop().fadeTo(300, 0);
                    });
                });
    });
	
	$("#back_to_top").click( function() {		
		$.scrollTo('0%',800)
	});
		
	/*	$("#featured_work_image").hover( function() {
			$("#featured_work_caption").slideToggle(200);
		});
	*/	
		
	$("#featured_work_image").hoverIntent({
				sensitivity: 3,  // number = sensitivity threshold (must be 1 or higher)
				interval: 50, // number = milliseconds for onMouseOver polling interval 
				over: growTall, // function = onMouseOver callback (REQUIRED)
				timeout: 50, // number = milliseconds delay before onMouseOut 
				out: growShort // function = onMouseOut callback (REQUIRED)
	});
	
	$(".blogimage").hoverIntent({
				sensitivity: 3,  // number = sensitivity threshold (must be 1 or higher)
				interval: 50, // number = milliseconds for onMouseOver polling interval 
				over: makeTall, // function = onMouseOver callback (REQUIRED)
				timeout: 50, // number = milliseconds delay before onMouseOut 
				out: makeShort // function = onMouseOut callback (REQUIRED)
	});
	
});

		function growTall(){  $("#featured_work_caption").animate({"top":0},150);}
		function growShort(){ $("#featured_work_caption").animate({"top":-50},150);}
		
		function makeTall(){ $(this).children(".blogimage_caption").animate({"top":0},150);}
		function makeShort(){ $(this).children(".blogimage_caption").animate({"top":-50},150);}

