/*------------------------------------------------- Document Ready-------------------------------------------------*/$(document).ready(function(){/* Open External Links in a New Window-------------------------------------------------*/	$('a[rel="external"]').click( function() {	        window.open( $(this).attr('href') );	        return false;	    });		/* I feel dumb for looking at other people's (appropriated) code-------------------------------------------------*/		$('a.about').click(function (e) {		e.preventDefault();		$('#aboutTilt').modal();	});	$('a.addys2009').click(function (e) {		e.preventDefault();		$('#addys2009').modal();	});	$('a.addys2008').click(function (e) {		e.preventDefault();		$('#addys2008').modal();	});/* Landing Page Cycle-------------------------------------------------*/	$(function(){		var cycleOpts = {			speed : '1200',			pause: 1,			timeout: 8000,			delay: 2000,			fx: 'fade',			cleartypeNoBg: true,			next:   '#next'	    	// prev:   '#prev'		}		//Initialize Cycle		$('.cycleBox').cycle(cycleOpts);	});	$('#controls span a#next').hover(function () {			$('.cycleBox div.titleBox')			.addClass('right');			}, function () {			$('.cycleBox div.titleBox')			.removeClass('right');		});	// $('#controls span a#prev').hover(function () {	// 			$('.cycleBox div.titleBox')	// 			.addClass('left');	// 			}, function () {	// 			$('.cycleBox div.titleBox')	// 			.removeClass('left');	// 	});/* Project Page Cycle-------------------------------------------------*/	$(function(){				// Fetch the children				var $slides = $('#projectBox').children('img');		// Define cycle options		var cycleOpts = {			speed : 'fast',			timeout : 0,			fx: 'fade',			next: '#projectBox img',			pager: '#projectBox + .thumbNav',			pagerAnchorBuilder: buildThumbs		}		// Builds thumbnails from slide images		function buildThumbs(idx, slide) {			return '<li><a href="#"><img src="' + slide.src + '" width="123" height="56" /></a></li>' 		}		// Test for multiple slides, if so then proceed		if ($slides.length > 1) { 			// Inject pager and initialize cycle			$('#projectBox').after('<ul class="thumbNav">').cycle(cycleOpts);		} else {			return false;		}	});}); // ------------------------------------  end of Document Ready
