var getKurslista = function(target,url,indicator){
	
	target.load(url, function(){
		indicator.hide();
	});
	
}

var view = function(what){
	if(what=='gbg'){
		jQuery('#loc_gbg').show();
		jQuery('#loc_sthlm').hide();
		jQuery('#loc_jnkp').hide();
	}else if(what=='jnkp'){
		jQuery('#loc_gbg').hide();
		jQuery('#loc_jnkp').show();
		jQuery('#loc_sthlm').hide();
	}else{
		jQuery('#loc_gbg').hide();
		jQuery('#loc_jnkp').hide();
		jQuery('#loc_sthlm').show();
	}
}
/*
$(document).ready( function(){
	
	
	var subitems = 0;
	$('#submenu li').each( function(){
		subitems++;
	});
	
	var width = Math.floor(837/subitems) - 5;
	var r = 0;
	$('#submenu li').each( function(){
		this.style.width = width+"px";
		r++;
		
		if(r==subitems){
			$(this).css({float:"right"});
			$(this).css({margin:"0"});
		}
		
	});
	
});*/


jQuery(document).ready(function($){
	
	$("a[href*=.pdf]").click(function(e){
		var document = $(this).attr('href');
		var title = $(this).text();
		
		
		if( document != null ){
			e.preventDefault();
			_gat._getTrackerByName()._trackEvent('PDF', 'Downloaded' , title, document);
    		setTimeout("document.location = \'" + document + "\'", 100);
		}		
		
	});
	
})
