function SyncHeights()
{
	  $('.sync_height').each(function(i) {
		  $('.sub_sync', this).syncHeight();
	  });
	   $('#schatten_rechts').css('height', $('#ContainerDiv').outerHeight()-1+'px');
}
	
function OnResize() {
	 var websiteWidth = $('#ContainerDiv').outerWidth();
	 if ($(window).width() < websiteWidth+42) {
	  $('#schatten_rechts').css('width', ($(window).width()-websiteWidth)+'px');
    }
}

jQuery(function($) {

  SyncHeights();
  window.setTimeout('SyncHeights()', 100);  
  window.setTimeout('SyncHeights()', 250);  
  window.setTimeout('SyncHeights()', 500);  
  window.setTimeout('SyncHeights()', 1000);  
  window.setTimeout('SyncHeights()', 1500);  
  window.setTimeout('SyncHeights()', 2000);  
  window.setTimeout('SyncHeights()', 3000);  
  window.setTimeout('SyncHeights()', 5000);  
  
  $(window).resize(function(){ 
	SyncHeights();
	OnResize();
  });
  
});
