$(window).load(function() {
	// Servicecenter
	var serviceCenter1 = $('#serviceCenter').height() - $('#serviceCenter .bar').height();
	serviceCenter1 = '-' + serviceCenter1 + 'px';	
	$('#serviceCenter').css("marginTop", serviceCenter1);
	$('#serviceCenter').show();
	
    $('#serviceCenter .bar .container a').toggle(
		function() {
			$('#serviceCenter').animate({marginTop: 0}, 'slow', function() {
													 
			});
		},
        function() {
			var serviceCenter2 = $('#serviceCenter').height() - 24;
			serviceCenter2 = '-' + serviceCenter2;
			
			$('#serviceCenter').animate({marginTop: serviceCenter2}, 'slow', function() {
														 
			});
    });
	
	// Category teaser mouseover
	$(".smallteaser li").hover(function() {
		var cssObj = {				
			'marginTop' : '-10px',
			'marginLeft' : '-10px',
			'width' : '150px',
			'height' : 'auto'
		}
		
		$(this).find('div').addClass("hover").stop()
			.css(cssObj);
	} , function() {
		var cssObj = {
			'marginTop' : '0',
			'marginLeft' : '0',
			'width' : '130px',
			'height' : 'auto'
		}
		
		$(this).find('div').removeClass("hover").stop()
			.css(cssObj);
	});
	
	$(".largeteaser li").hover(function() {
		var cssObj = {				
			'marginTop' : '-10px',
			'marginLeft' : '-10px',
			'width' : '215px',
			'height' : 'auto'
		}
		
		$(this).find('div').addClass("hover").stop()
			.css(cssObj);
	} , function() {
		var cssObj = {				
			'marginTop' : '0',
			'marginLeft' : '0',
			'width' : '195px',
			'height' : 'auto'
		}
		
		$(this).find('div').removeClass("hover").stop()
			.css(cssObj);
	});
	
	$("li.cat-post-item").hover(function() {
		var cssObj = {				
			'marginTop' : '-10px',
			'marginLeft' : '-10px',
			'width' : '140px',
			'height' : 'auto'
		}
		
		$(this).find('div').addClass("hover").stop()
			.css(cssObj);
	} , function() {
		var cssObj = {				
			'marginTop' : '0',
			'marginLeft' : '0',
			'width' : '100px',
			'height' : 'auto'
		}
		
		$(this).find('div').removeClass("hover").stop()
			.css(cssObj);
	});
});
