if(document.location=='http://www.trelleborgsallehanda.se/'){
	document.write('<style>#lasarpuls + .ad + .story + .story{display:none;}</style>');
}
statman = {};
statman_startTime=(new Date()).getTime();
$(document).ready(function() {
if ($('#google_ads_div_TA_sponsor').length <= 0
	&& $('#google_ads_div_TA_sponsor_ad_container').length <= 0) {

			}
			else {
				$('.balk').hide();
				$('#sponsor').show();

			}

		
});

sds.ads.showFullScreen=function() {
	if (sds.ads.adExist('Fullscreen')) {

		if ($.cookie('sds_overlayAd') == null) {
			var fullscreen=sds.ads.getAd('Fullscreen');
			fullscreen.css('position', 'fixed');
			var height = fullscreen.find("object").attr('height');
			var adWidth = fullscreen.find("object").attr('width');
			if (adWidth == undefined) {
				adWidth = fullscreen.attr('width');
			}
			if (adWidth == undefined) {
				adWidth = fullscreen.find("*[width]").attr('width');
			}
			if (height != 300) {
				$.cookie('sds_overlayAd', 'hide', { expires: 1, path: '/', secure: false,domain:sds.global.getSecondLevelDomain() });
				var width = screen.width;
				height = screen.height;
				if (fullscreen_bgColor != undefined) {
					$("#ad_fullscreen").css('background-color', fullscreen_bgColor);
				}
				if (fullscreen_textBgColor != undefined) {
					$("#ad_fullscreen_close").css('background-color', fullscreen_textBgColor);
				}
				if (fullscreen_textColor != undefined) {
					$("#ad_fullscreen_close").css('color', fullscreen_textColor);
				}
				$("#ad_fullscreen").css('height', height + 'px');
				$("#ad_fullscreen").css('width', width + 'px');
				fullscreen.css('position', 'fixed');
				fullscreen.css('left', '50%');
				fullscreen.css('margin-left', -(adWidth / 2) + "px");
				$("#ad_fullscreen").css('position', 'fixed');
				$("#ad_fullscreen").css('top', '0');
				$("#ad_fullscreen").css('left', '0');
				$('#ad_fullscreen').jqm({overlay:0,onShow:function(hash) {
					hash.w.show();
					setTimeout("$('#ad_fullscreen').jqmHide();", 7000);
				}});
				$('#ad_fullscreen').jqmShow();
			}
		}
	}
};
sds.ads.fixOuterAds=function() {
			var panorama = sds.ads.getAd('Panorama');
			var rightBox = sds.ads.getAd('wrap_right');
			var leftBox = sds.ads.getAd('wrap_left');
			var height=$('#panorama').height();
			if (sds.ads.adExist('Panorama_Fixed') && $(window).height() >= 500+height && sds.global.is_position_fixed_supported() &&
					!($.browser.msie && $.browser.version <= 7.0)) {
				var fixed = sds.ads.getAd('Panorama_Fixed');
				if (fixed.height() == 0) {
					sds.ads.getAd('Panorama_Fixed').hide();
					fixed = $('#panorama object:first');
					if(fixed.length<=0){
						fixed=$('#panorama a:first');
					}
					fixed.css({'background-image':'url("/template/ver2-0/gfx/ad_label_top.png")','background-repeat':'no-repeat'});
				}
				fixed.parent().css('height', fixed.parent().outerHeight());
				fixed.css({'position':'fixed'});
				fixed.css({'top':0,'margin':'0 0 0 -' + fixed.width() / 2 + 'px','left':'50%','padding':0,'padding-top':'10px','z-index':100,'background-color':'#fff'});
			}
			if (leftBox.length > 0) {
				$('#ad_outside_left').css('left', -leftBox.width());
			}
		};
sds.sticky.addStickyObject=function(object){
	if ($.browser.msie && $.browser.version <= 7.0) {
			return;
		}
		object.each(function() {
			var curr = $(this);
			var fixed = sds.ads.getAd('Panorama_Fixed');
			if (fixed.length > 0 && fixed.height() == 0) {
				fixed = $('#panorama object:first');
			}
			if(fixed.length<=0){
				fixed=$('#panorama a:first');
			}
			var fixed_height=$('#panorama').height();
			var marginTop = fixed.length > 0 && $(window).height() >= 500+fixed_height ? fixed.outerHeight() : 0;
			curr.parent().css({height:curr.parent().height() + 'px'});
			var o = {
				id:curr,
				topPos:curr.position().top,
				marginTop:marginTop,
				position:curr.css('position'),
				currPos:0,
				onChange:function() {
					if (this.id.css('position') == 'fixed') {
						curr.find('.main_nav_inner').addClass('hidden');
					} else {
						curr.find('.main_nav_inner').removeClass('hidden');
					}
				}
			};
			sds.sticky.stickied[sds.sticky.stickied.length] = o;
		});
};
$("document").ready (function (){

	$('div[id^="google"]').css('height','auto');
 	$('#google_ads_div_SDS_wrap_right_ad_container').css('width','0px'); /* fix högerbanner på bla ekonomi */   
    
});
