/*jQuery.fn.extend({
	includeJS: function() {
	 return this.each(function() { this.checked = true; });
	}
});*/
var Global = { solstring : ''};
$(document).ready(function() {
	// Google analytics
	_uacct = "UA-1482738-1";
	urchinTracker();
	// /Google analytics
	
	// SOL ratings
	/*
	Nnv=navigator;Nna=Nnv.appName;Nd=document;Nd.cookie="b=b";Nc=0;if(Nd.cookie)Nc=1;
	Nn=(Nna.substring(0,2)=="Mi")?0:1;Ns=screen;Npx=(Nn==0)?Ns.colorDepth:Ns.pixelDepth;
	str='<img src="http://c.sol.no/4219;'+Ns.width+'x'+Ns.height+';'+Npx+';'+Nc+';';
	str=str+escape(Nd.referrer)+';'+Math.random()+'" width="102" height="34" border="0">';
	Global.solstring = str;
	*/
	// /SOL ratings

	// $('head').append('<script type="text/javascript" src="liveinclude.js"></script>');
	$('a[@rel=guidelines]').click(function(e) {
		window.open(this.href);
		e.preventDefault();
	});
	
	$('a[@rel=agreement]').click(function(e) {
		window.open(this.href);
		e.preventDefault();
	});
	
	if( $('#ad_preview').length ) {
		var header = $('<h3>Forhåndsvisning</h3>');
		header.insertBefore('#ad_preview');
		var previewContainer = $('#ad_preview');
		function previewUpdate() {
			var url = $('#AdvertisementUrl').attr('value');
			var title = $('#AdvertisementTitle').attr('value');
			var text = $('#AdvertisementText').attr('value');
			
			previewContainer.html('<a href="' + url + '" target="_blank"><em>' + title + '</em>' + text + '</a>');
		}
	
		$('#AdvertisementUrl').keyup(previewUpdate);
		$('#AdvertisementTitle').keyup(previewUpdate);
		$('#AdvertisementText').keyup(previewUpdate);
	}
});

// Google Ads
google_ad_client = "pub-2664123724259449";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_text = "000000";
google_color_url = "0066CC";

