	Event.onDOMReady(function() {
		// do some CSS magic for no javascript version
		Element.addClassName('main', 'hasjs');
		
		/* swapper
		----------------------------- */
		// some DOM stuff
		var wrapper = $$('.swapcontainer')[0];
		var triggers = $$('#main .swapnav');
		var contents = $$('#main .swapcontent');

		// all the important stuff
		if (triggers.length>0 && contents.length>0) {
			var pagenav = new PageNav($$('#main .pagenav'), $$('#main #subnav li'), 'swapcontent');
			var swapper = new FadeSwap(wrapper, triggers, contents, 'click');
			var anchors = new AnchorFix(triggers, contents, swapper);
			
			// find the default
			var id = 0;
			if (document.location.hash) {
				var initial = document.location.hash;
				initial = initial.match(/#(.*)/)[1];
				var doesContentExist = anchors.doesContentExist(initial)
				if (doesContentExist) {
					id = doesContentExist.index;
				}
			}
			
			// swap to the default
			swapper.swapContent(null, id);
		}
		/* hero fader
		----------------------------- */
		if($$('#hero>img').length > 0) new AC.CrossfadeQueue($$('#hero>img'), 'hero');
		
		/* send to a friend
		----------------------------- */
		if($('sendtofriend')) $('sendtofriend').observe('click', function() {
			AC.Tracking.trackClick({
				pageName: 'Apple - Back to School - Send to a Friend',
				prop3: 'Apple - Back to School - Send to a Friend'
			});
		});
		if($('compare')) $('compare').observe('click', function() {
			AC.Tracking.trackClick({
				pageName: 'Apple - Back to School - Compare Macs',
				prop3: 'Apple - Back to School - Compare Mac'
			});
		});
		$$('#themechooser li.choice').each(function(theme, i) {
			Event.observe(theme, 'click', function(evt, i) {
				Share.theme = i;
				var color = theme.down('img').className;
				$w($('sharepreview').className).each(function(clas) {
					if(clas.indexOf('theme-') != -1) $('sharepreview').removeClassName(clas);
				});
				$('sharepreview').addClassName('theme-'+color);
				$$('#themechooser li').each(function(li) {
					if(li.hasClassName('active')) li.removeClassName('active');
				})
				theme.addClassName('active');
			}.bindAsEventListener(this, i));
		});
		Share.theme = 0;
		Share.geo = 'us';
		Share.shareId = 106;
		Share.initOptions(arguments);
		Share.buildForm();
		Share.addValidation();
	});
	function signUpWindow() {
		window.open('/backtoschool/includes/signup.html','sharer','toolbar=0,status=0,width=345,height=790')
		return false;
	}

