if( typeof(jQuery) !== 'undefined' ) 
	jQuery(document).ready(
		function($)
		{
			/*$("#content .front-slideshow").cycle(
				{
	    			fx: 'fade',
	 				slideExpr: '.front_slideshow_image',
		    		speed: 300
				}
				
			);*/


			$(".project-link img").tipTip({attribute: "alt"});

			
			$("a[rel^='prettyPhoto']").prettyPhoto({ theme: 'dark_glas', opacity: 0.30, show_title: true });

					
			// THIS IS REALLY FREAKING BIZARRE 
		    // I SHOULD NOT HAVE TO DO THIS BUT IE (6 & 7) ARE PRETTY MESSED UP.
			var nav = $('aside nav');
			/*
			 * MAGICAL SCROLLING NAV
			 * (not that magical)
			 * 
		 	 * This is using lots of vars because it gets called all the time 
		 	 * on scroll, so it needs to be fast.
			 */
			var topmost_point = nav.offset().top;
		    var left_point = $('#container').offset().left;
			var PADDING_TOP = 40; // MAGIC NUMBER
		    var REAL_TOP = topmost_point - PADDING_TOP;
			var the_window = $(window);
			var NAV_IS_FIXED = (nav.css('position') == 'fixed');
			the_window.scroll(function () {
		        if (the_window.scrollTop() > REAL_TOP) {
		            if ($.browser.msie && $.browser.version == "6.0") {
		                nav.css('top', the_window.scrollTop() + PADDING_TOP);
		            } else if (!NAV_IS_FIXED) {
		        	    nav.css({
		        	        top: PADDING_TOP,
		        	        position: 'fixed'
		        	    });
		        	    NAV_IS_FIXED = true;
		        	}
		        } else {
		            if (NAV_IS_FIXED) {
		                nav.css({
		                    position: 'absolute',
		                    top: topmost_point
		                });
		                NAV_IS_FIXED = false;
		            }
		        }
			});
			
			
			
		}
	);
