var general = { 
	
	// OnLoad functions
	init: function(){
		this.bubbleEvt();
	},
	
	bubbleEvt: function() {

		//general.initImageRotator();
		general.setMinHeight();
		general.setOverflowScroll();
		
		$(".startpage .blurbrow1 .blurb2 table tr:odd").addClass('bg')
		
		$(".startpage .blurbrow1 .blurb2 tr th:last-child, .startpage .blurbrow1 .blurb2 tr td:last-child").addClass('text-right')
			
		/*if ($('.section-page-rotator').length > 0) {
			$('.menu li ul').not('.menu li ul ul').css('top','499px')
		}*/
		
		$('.content-rotator ul, .content-rotator.section-page-rotator ul').innerfade({
			speed: 'slow', 
			timeout: 3000, 
			type: 'sequence', 
			containerheight: '346px'
		});	
					
	    $("#map-stockholm").goMap({
	        markers: [{  
	            latitude: 59.33804074583278, 
	            longitude: 18.075848000000008,
				id: 'stockholm'
	        }],					
	        latitude: 59.33804074583278, 
	        longitude: 18.075848000000008, 
	        zoom: 15,
			maptype: 'ROADMAP',
	        mapTypeControlOptions: {
	            position: 'right', 
	            style: 'DROPDOWN_MENU' 
	        },		 
	        disableDoubleClickZoom: true 
	    });	
				
	    $("#map-london").goMap({ 
	        markers: [{  
		        latitude: 51.50751520413581, 
		        longitude: -0.14867246298218895,
				id: 'london'
	        }],		
	        latitude: 51.50751520413581, 
	        longitude: -0.14867246298218895, 
	        zoom: 15,
			maptype: 'ROADMAP',
	        mapTypeControlOptions: {
	            position: 'right', 
	            style: 'DROPDOWN_MENU' 
	        },		 
		    disableDoubleClickZoom: true 
	    });			


	},
	
	initImageRotator: function(e) {
		
		$rotatorHolderElm = $('.content-rotator, .content-rotator.section-page-rotator')
		
		//$rotatorHolderElm.find('img:first').css('visibility','visible');
		
		
	},	
		
	setMinHeight: function(e) {
		$("div.footer").css("visibility","visible");
	},
	
	setOverflowScroll: function(e) {
	
		var minHeight = 361;
	
		
		$mainContentElm = $(".articlepage .main-content, .transactionpage .main-content, .listpage .main-content");
			
		$(".articlepage .main-content .facts-holder, .articlepage .main-content blockquote").css('margin','0 -11px 20px 15px')
		
		$(".transactionpage .main-content li .right-col").css('width','502px')
		
		if($.browser.msie) {
			$mainContentElm.css({overflow: 'auto', overflowX: 'hidden'})
			
			$(".transactionpage .main-content ul span, .transactionpage .main-content ul h2, .transactionpage .main-content ul p").css('width','345px')

			if ($.browser.version == 6) {
				$(".articlepage .main-content .facts-holder, .articlepage .main-content blockquote").css('margin','0 0 20px 15px')
			}
		} else {
			//$mainContentElm.css({height: minHeight+'px', width: '680px', paddingRight: '20px', overflowX: 'auto'})
		}		
		
	}
		
}

$(document).ready(function(){			   
	general.init();
});
