﻿(function () {
	
	//--------------------------------------
	// IMPORT
	//--------------------------------------
	
	
	//--------------------------------------
	// PRIVATE VARIABLES
	//--------------------------------------
	
	
	//--------------------------------------
	// PRIVATE METHODS
	//--------------------------------------
	
	
	//--------------------------------------
	// CONSTRUCTOR
	//--------------------------------------
	
	$(function () {
		var overCSS = {
			backgroundColor: '#BFBFBF',
			color: '#272727'
		};
		var outCSS = {
			backgroundColor: '#272727',
			color: '#BFBFBF'
		};
		
		$('#returnToTop').click(function () {
			$(this).blur();
			$('html,body').animate({scrollTop: 0}, 'slow');
			
			return false;
		});
		
		if (jQuery.browser.msie) return false;
		
		$('#ancillary li a').hover(
			function () {
				$(this).stop();
				$(this).animate(overCSS, 200, 'linear', function () {
					$(this).css(overCSS);
				});
			},
			function () {
				$(this).animate(outCSS, 400, 'linear', function () {
					$(this).css(outCSS);
				});
			}
		);
		
		$('.syntax_hilite_planecode').each(function () {
			var div = $(this);
			var width = div.width();
			var height = div.height();
			
			
			var id = div.attr('id');
			var a = $('a[href="#' + id + '"]');
			var rel = 'shadowbox;width=' + width.toString() + ';height=' + height.toString() + ';';
			a.attr('rel', rel);
		});
		
		$('a[target="_blank"]').each(function () {
			var a = $(this);
			a.attr('rel', '');
		});
		
	});
	
	
})();












