// Load jQuery & swfobject
google.load("jquery", "1.4.2");
google.load("swfobject", "2.2");

// set onload
google.setOnLoadCallback(function() {

	// remove no_JS class from body tag
	$('body').removeClass('no_JS');

	function init_flash(){
		var flash_version = "8.0.0";
		var eiswfurl = "";
		var flashvars = {};
		var params = {
			wmode: "transparent"
		};
		var attributes = {};
		if (swfobject.hasFlashPlayerVersion(flash_version)){
			// has Flash
			swfobject.embedSWF("/includes/swfs/ss_faith.swf", "hpflash", "639", "330", flash_version, eiswfurl, flashvars, params, attributes);
		}
		else{
			// doesn't have Flash
			$('body').addClass('no_JS');
		}
	}

	init_flash();

	$("#ads div").hover(
		function () {
			$(this).addClass("adshover");
		},
		function () {
			$(this).removeClass("adshover");
		}
	);

	$("#ads div").click(function(){
		window.location=$(this).find("a").attr("href");
		return false;
	});

	$("#info div").hover(
		function () {
			$(this).addClass("infohover");
		},
		function () {
			$(this).removeClass("infohover");
		}
	);

	$("#info div").click(function(){
		window.location=$(this).find("a").attr("href");
		return false;
	});

});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-16419786-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';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();