// JavaScript Document


//jQuery Tools tooltips
$(document).ready(function() {
	// tooltips at navbar
	$("#navbar a[title]").tooltip({ 
        	tip: '.navtips',
		// tweak the position
		position: "bottom center",
        	offset: [2,0]
	});
	// tooltips at logo
	$("#mastheadwrapper h2 a[title]").tooltip({ 
        	tip: '.logotips',
		// tweak the position
		position: "bottom center"
	});
	// tooltips at social icons (stalk me)
	$("#stalkMe a[title]").tooltip({ 
        	tip: '.icontips',
		// tweak the position
		position: "top center"
	});
	// tooltips at inline links
	$("#content a.bubble[title]").tooltip({ 
        	tip: '.icontips',
		// tweak the position
		position: "top center"
	});
	// tooltips at  links
	$("#content .cols a[title]").tooltip({ 
        	tip: '.icontips',
		// tweak the position
		position: "top center"
	});
	// library
	$("#list li a[title]").tooltip({ 
        tip: '.icontips',
		// tweak the position
		position: "top center"
	});
	// tools
	$(".tools li a[title]").tooltip({ 
        	tip: '.icontips',
		// tweak the position
		position: "top center"
	});
	// language selector
	$("#langselect li a[title]").tooltip({ 
        	tip: '.langtips',
		// tweak the position
		position: "bottom center"
	});
	// end tooltips
	//------------------
	// feature list plugin
		$('#featured').before('<ul id="featured_nav">').cycle({ 
		    fx:     'fade', 
		    speed:  1700, 
		    timeout: 5000, 
		    pager:  '#featured_nav', 
			// callback fn that creates a string to use as pager anchor 
			pagerAnchorBuilder: function(idx, slide) { 
		   return '<li><a href="#">' + slide.alt + '</a></li>'; 
	    } 
	});
});

// overlay @ portfolio
// no document ready if overlay is 'apple'
$(function() {
	$("#triggers img[rel]").overlay({effect: 'apple'});
});
