/* http://docs.jquery.com/Events/readyhttp://15daysofjquery.com/quicker/4/http://www.learningjquery.com/2006/09/introducing-document-ready*/$(document).ready(function() {						   	$('#noscript').remove();	$("h2#beginner, h2#advanced").addClass('hide');	$("#advanced-copy").hide();	$("#section").show();		$("input").removeAttr("disabled"); 		fixNavLinks();		$('#section').change(function() {		window.location = this.value;	});	$('#print a').click(function() {		window.print();	});	$('input[type=button]').click(function() { 		if (!this.id) { 			window.location = this.alt;			}	});	$("a[href$=jpg], a[href$=JPG], a[href$=gif], a[href$=png], a.lightbox").fancybox({ 'hideOnContentClick': true,frameWidth: 1000,frameHeight: 600 }); 	$('#toggle a').click(function() {		if (!$(this).hasClass('active') && $(this).parent().attr('id') != 'print') {			$('#toggle a').toggleClass('active');			$('#toggle #print a').removeClass('active');			$('#copy #beginner-copy, #copy #advanced-copy').hide();			$(this.hash + '-copy').fadeIn();			location.hash = this.hash;		}		return false;	});			if(location.hash.length && location.hash != '#' && (location.hash == "#advanced" || location.hash == "#beginner")){		$('#copy #beginner-copy, #copy #advanced-copy').hide();		$('#beginner-btn, #advanced-btn').removeClass('active');				$(location.hash + '-copy').show();		$(location.hash + '-btn').addClass('active');	}	$("#pictures a[href$=jpg], #pictures a[href$=JPG], #pictures a[href$=gif], #pictures a[href$=png], a[href$=jpg].lightbox").hover(	  function () { $(this).append('<div class="plus">&nbsp;<\/div>');}, 	  function () {$('.plus').remove();}	);	if ($('#right')) {		$('#right').click(function() {			$('.wrong').hide();			$('.right').fadeIn('normal');			$('.moreInfo').fadeIn('normal');			$("input").attr("disabled", "disabled"); 		});		$('#wrong, #wrong-alt, #wrong-alt2, #wrong-alt3, #wrong-alt4, #wrong-alt5').click(function() {			$('.right').hide();			$('.wrong').fadeIn('normal');			$('.moreInfo').fadeIn('normal');			$("input").attr("disabled", "disabled"); 		});	}	var bigImages = new Array();	$("#pictures a[href$=jpg], #pictures a[href$=JPG], #pictures a[href$=gif], #pictures a[href$=png]").each(function() { 		if (bigImages[this.href] == undefined) {			$('#content').after('<div class="big"><img src="' + this.href + '" alt="" /><br /><strong>' + this.title + '</strong></div>');			bigImages[this.href] = true;		}	});	$("div.big").wrapAll("<div class=\"hide\"></div>");	$("div.big img").each(function() { 		resizeImage(this, 450, 450);	});				});function fixNavLinks(){	var path = window.location.pathname;		if(path.search('english')==-1){		var lang = 'french'; 		var otherLang = 'english'; 		var path = window.location.pathname.replace(/french/,'english');	} else { 		var lang = 'english'; 		var otherLang = 'french'; 		var path = window.location.pathname.replace(/english/,'french');	}			$('#section option').each(function(){					var href = $('#language a').attr('href').split(otherLang);			this.value= href[0] + this.value;	});					// ie7 hack to stop duplicate drive letters on the CD version	if($.browser.msie && $.browser.version == 7){		path = path.replace(/[A-Z]{1}\:\//, '');	}		$('#language a').attr('href', path);			}function resizeImage(image, maxwidth, maxheight){	w = image.width;	h = image.height;				if (w == 0) { image.width = maxwidth; }	else if (w > h) { if (w > maxwidth) image.width = maxwidth; }	else { if (h > maxheight) image.height = maxheight; }}