$(document).ready(function(){
	
	jQuery('#mg_subcontent_box-1, #mg_subcontent_box-2, #mg_subcontent_box-3')
		.bind( 'mouseenter', function(){														 
			jQuery( this ).css("background" ,"#38536b")
			jQuery( 'a',this ).css("color" ,"#ffffff")
			
		})  
		.bind( 'mouseleave', function(){
			jQuery( this ).css("background","#ffffff");	
			jQuery( 'a',this ).css("color" ,"#555555")
		}); 	
		
		gallery_size();
									
	jQuery( '#mg_reasons_inner' ).vjg2({
		autostart:		'true',
		timeout:		5000,
		effect:			'scroll',
		type:			'html',
		links: {
			next:		'#button_next',
			prev:		'#button_prev'
		},
		navigation: {
			container: '#mg_reasons_navigation',
			format: function( instId, index ){
				return '<a href="#" onclick="vjg2.jump(' + instId + ', ' + index + ' ); return false;"></a>';
			}
		}
	});
		
		jQuery('table#roomtype-prices-parents-summer').hide();
		jQuery('#cst-detail-prices-childrens-summer').hide();
	
		//Sommerpreise und Kinder-Sommerpreise e
		jQuery('#cst-detail-prices-summer')
		.bind( 'click', function(){	
			jQuery( '#roomtype-prices-parents-summer' ).slideToggle("slow");
			jQuery( '#cst-detail-prices-childrens-summer' ).slideToggle("slow");
			return false;	
		}) ; 				
});
	
function gallery_size()	
{
	if( $(window).width()<=1200 ) {
		jQuery('div.mg_start_header_container').css('width','980px');
		jQuery('div#mg_start_container div.mg_logo div.article-pos-2').css('right','200px');
		jQuery('div#mg_start_container div.mg_languages').css('right','200px');
		jQuery('div#mg_start_container div#mg_gallery_wrapper a.button-prev').css('left','160px');
	}
	else
	{
		jQuery('div.mg_start_header_container').css('width','1140px');
		jQuery('div#mg_start_container div.mg_logo div.article-pos-2').css('right','100px');
		jQuery('div#mg_start_container div.mg_languages').css('right','100px');
		jQuery('div#mg_start_container div#mg_gallery_wrapper a.button-prev').css('left','0px');
	}
	
};
$(document).ready(gallery_size)
$(window).resize(gallery_size);
