// Firebug logginglog = function() {	/*	if ($.browser.mozilla && window.console) {		window.console.log(arguments);	};	*/};browserIsIE = function() { return $.browser.msie };browserIsIE6 = function() { return ($.browser.msie && parseInt($.browser.version.substr(0,1))<7) };browserIsIE6or7 = function() { return ($.browser.msie && parseInt($.browser.version.substr(0,1))<8) };// lightbox presetsvar fancyboxOptions = {	padding: 10,	centerOnScroll: true,	onComplete: function(){ $('#overlay').removeAttr('class').addClass('dialog').show() },	onCleanup: function(){ $('#overlay').hide() },	overlayShow: false,	enableEscapeButton: true};		// google analyticsvar _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-3966798-1']);_gaq.push(['_trackPageview']);(function() {	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';	(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);})();// init contentfunction initContent() {		if (!browserIsIE6()) {		$('.rounded').corner('10px').find('.inner').corner('7px');		$('.message').corner('10px').find('.inner').corner('7px');	};		$('a.lightbox')		.each( function() {			var self = $(this);						if (!browserIsIE6()) {				self.fancybox( fancyboxOptions )					.hover(						function(){ self.addClass('hover') },						function(){ self.removeClass('hover') }					)					.siblings('a.magnifier')						.click(function(){							self.trigger('click');							return false;						})						.hover(							function(){self.trigger('mouseover')},							function(){self.trigger('mouseout')}						)						.show();			} else {				self.attr('href', 'javascript:void(null);').siblings('a.magnifier').remove();			};						});			};// initiate all buttonsfunction initButtons() {	$('a.button')		.mousedown( function(){ $(this).addClass('button-press') })		.mouseup( function(){ $(this).removeClass('button-press') })		.mouseout( function(){ $(this).removeClass('button-press') })		.show();			};// async image loadfunction loadImage( elem, src ) {	// create new image object	var img = new Image();	$(img).data('elem', elem);	$(img).load(function(){		$(this).data('elem')			.css('background-image','url('+ $(this).attr('src') +')')			.removeClass('loading');	})	.error(function(){ log('IMAGE LOAD ERROR: ' + src); })	.attr('src', src);};// update the addthis urlfunction loadAddThis() {	if (!browserIsIE6()) {		var script = 'http://s7.addthis.com/js/250/addthis_widget.js#username=teutoniausa&domready=1';		if (window.addthis) { window.addthis=null };		$.getScript( script );	} else {		$('#addthis').remove();	};};function updateAddThis( url, title, desc ) {	if (!browserIsIE6()) {		// update it...		$('#addthis div.addthis_toolbox')			.attr('addthis:url', domain + url)			.attr('addthis:title', title)			.attr('addthis:description', desc);				// then load it...			loadAddThis();	};};// twitterString.prototype.parseURL = function() {	return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(url) {		return url.link(url);	});};String.prototype.parseUsername = function() {	return this.replace(/[@]+[A-Za-z0-9-_]+/, function(u) {		var username = u.replace("@","");		return u.link("http://twitter.com/"+username);	});};String.prototype.parseHashtag = function() {	return this.replace(/[#]+[A-Za-z0-9-_]+/, function(t) {		var tag = t.replace("#","%23");		return t.link("http://search.twitter.com/search?q="+tag);	});};function formatTwitterEntry(text){	return text.parseURL().parseUsername().parseHashtag();};// DOM-dependent script...$(document).ready(function(){		// initialize all content	initButtons();	initContent();	new formManager();		/* get any loadImages loading...	if (!browserIsIE6or7()) {		$('div[loadimage]')			.css('background-image','none')			.addClass('loading')			.each(function() {				loadImage($(this), $(this).attr('loadimage'));			});	};	*/		// create overlay & apply window sizing	$('<div id="overlay"><div><h2>updating configuration...</h2></div></div>').appendTo('body');	$(window)		.bind("resize", function(e) { $("#overlay").width( $(window).width() ).height( $(document).height() ) })		.trigger('resize');		// initialize JS control of newsletter form	$('#newsletter')		.find('form').bind('aftersubmit', function(){			if (_gaq) {				_gaq.push(['_trackPageview', '/newsletter']);			};		})		.end()		.find('input[name=jsEnabled]').val('true');					// update the addthis title to match the page title	$('#addthis div.addthis_toolbox').attr('addthis:title', document.title);	loadAddThis();			// cycle images	if ( !browserIsIE6() ) {		$('.cycleimages img:first-child').parent().cycle({fx:'zoom', easing:'easeInOutQuint', duration:750});	} else {		$('.cycleimages img:first-child').siblings().remove();	};		});