$('body').css('visibility', 'hidden');

$(document).ready(function() {
	$('#body').prepend('<div id="top"><div class="container">&nbsp;</div></div>');
	
	$('#kontakt dd:odd').each(function() {
		$(this).text(', '+$(this).text());
	});
	
	$('#menu ul ul').hide();
	
	if($('#kancelaria').length || $('#klienci').length || $('#wynagrodzenie').length || $('#zespol').length || $('#pro-bono').length || $('#praca').length) {
		$('#menu li.chambers ul').show();
	}
	
	if($('#it').length || $('#telekomunikacja').length || $('#zamowienia-publiczne').length || $('#wlasnosc-intelektualna').length) {
		$('#menu li.specialisations ul').show();
	}
	
	if($('#przetargi').length || $('#umowy-negocjacje').length || $('#analizy-opinie-prawne').length || $('#audyty').length || $('#spory-sadowe-arbitrazowe').length || $('#szkolenia').length) {
		$('#menu li.services ul').show();
	}
	
	$('#menu ul li p a').bind('mouseover', function() {
		if(!$('#menu ul ul').queue().length) {
			if($(this).parent().parent().children('ul').length && !$(this).parent().parent().children('ul:visible').length) {
				$('#menu ul ul').slideUp('fast');
				$(this).parent().parent().children('ul').slideDown('fast');
			}
		}
	});
	
	if($('#content.home').length || $('#content.chambers').length)
	{
		var flashvars = {};
		var attributes = {};
		
		var params = {
			wmode: "opaque"
		};
		
		swfobject.embedSWF("/images/maruta.swf", "collateral", "200", "275", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
	}
	if($('#content.home_en').length || $('#content.chambers_en').length)
	{
		var flashvars = {};
		var attributes = {};
		
		var params = {
			wmode: "opaque"
		};
		
		swfobject.embedSWF("/images/maruta.swf", "collateral", "200", "275", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
	}
	
	if($('#content.new-technologies').length)
	{
		$('#content.new-technologies ul:eq(0)').css('margin-top', '-1em');
	}
});
