$(document).ready(function() {
	
	scroll_options = {
		queue: true,
		duration: 1500,
		axis:'y',
		offset:0,
		easing:'easeOutQuad'
	};
	$.localScroll(scroll_options);


	$('#form_button_submit').hover(
		function(){$(this).addClass('hover');},
		function(){$(this).removeClass('hover');}
	);


	$(".box").hover(function() {
		var $t = $(this);
		var p = $t.position();
		if($t.next("div").size > 0) return;

		var $div = $("<div></div>")
		.attr('class', 'box_border')
		.width($t.width()-2)
		.height($t.height()-2)
		.css({
			border: '2px solid #b9b9b9',
			position: 'absolute',
			top: p.top + 'px',
			left: p.left + 'px',
			'z-index': '-20'

		}).mouseout(function(event) {
			$(this).remove();
		});

		$t.before($div)
		$div.fadeTo("slow", 0);
	}, function() {
		// do nothing
		});

	$(function() {
		$('a[rel*=external]').click( function() {
			window.open(this.href);
			return false;
		});
	});
		
});

Cufon.replace('h1')('h2')
Cufon.replace('#content p', {lineHeight: '22px', fontSize: '15px'});
Cufon.replace('#header_meta', {lineHeight: '22px', fontSize: '15px'});

Cufon.replace('#footer h3');
Cufon.replace('#footer .desc');


// Google analytics - asynch method
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8980585-3']);
_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);
})();


