var pageLayout = {
	cls:'all-bg',
	cols:[
		{
			size:'50%',
			clsOfContainer:'all-left-rep',
			cls:'all-left',
			rows:[
				{
					cls:'bottom-left',
					y:'629,,'
				}
			]
		},
		{
			size:870,
			x:',870,',
			cls:'main',
			rows:[
				{	// top
					size:93,
					cls:'top',
					cols:[
						{
							place:'#logo',
							size:224
						},
						{
							size:'fill'
						},
						{
							cls:'knx-partner',
							size:104
						},
						{
							// knx partner, lang selector
							size:44,
							x:',auto,0',
							y:'7,auto,',
							place:'#langSelector',
							rows:[
								{
									place:'a',
									y:'10,auto,'
								}
							]
						}
					]
				},
				{	// menu
					size:41,
					cls:'menu',
					y:',41,',
					cols:[
						{
							cls:'menu-left',
							size:16
						},
						{
							size:1,
							clsOfContainer:'menu-block',
							place:'.menu-item',
							x:',auto,',
							y:',auto,'
						},
						{
							size:'fill'
						}
					
					]
					
				},
				{	// content
					size:460,
					cols:[
						{
							size:224,
							y:'35,,',
							x:',224,',
							place:'#submenu',
							keepIfEmpty: true
							
						},
						{
							place:'#content',
							x:'35,,25',
							y:'32,,32'
						}
					]
				},
				{
					size:'fill',
					cls:'footer',
					y:'35,,',
					rows:[
						{
							size:93,
							cols:[
								{
									size:224,
									y:'8,41,',
									place:'#panel'
								},
								{
									place:'#footer-info',
									x:'50,,50',
									y:'14,,'
								}
							
							]
							
						},
						{
							size:77,
							y:',77,',
							cols:[
								{
									place:'.logos img',
									x:',auto,',
									y:',auto,'
								}
							]
						},
						{
						
						}
					]
				}
			]
		},
		{	// menu right stretch
			size:'50%',
			cls:'menu',
			y:'93,41,',
			rows:[
				{
					place:'#authors',
					y:'535,,'
				}
			]
		}
	
	]
}

$(document).ready(function() {
	BraveLayout.fill();
	$('.menu-block:has(a.menu-item.selected)').css({ background:'black' });

	$('.menu-block').hover(
		function() { 
			$('.menu-block:has(a.menu-item.selected)').css({ background:'none' });
			$(this).css({ background:'black' });
		}, 
		function() {
			$(this).css({ background:'none' });
			$('.menu-block:has(a.menu-item.selected)').css({ background:'black' });
/*			if(!$('a.menu-item.selected', this).size()) {
				$(this).css({ background:'none' });
			}*/
		}
	);
	$('.submenu-item, .subsubmenu-item').hover(
		function() {
			$('#submenu .submenu-item.selected, .subsubmenu-item.selected').css({ background: 'none' });
			$(this).css({ background: 'url(/components/Page/img/submenu-h.png) no-repeat 0 2px' });
		},
		function() {
			$(this).css({ background: 'none' });
			$('#submenu .submenu-item.selected, .subsubmenu-item.selected').css({ background: 'url(/components/Page/img/submenu-h.png) no-repeat 0 2px' });
		}
	);
	$('#panel').fancybox({ 'hideOnContentClick': false, frameHeight: 300 });
	$('#content img').not('.bez').css({ cursor: 'pointer' }).each(function() { this.href = this.src.replace('/male/','/duze/').replace(/\.png$/, '.jpg'); this.rel = 'group'; }).fancybox({ 'hideOnContentClick': false, frameHeight: 300 });
	if($('#content.flexcroll').length) {
		CSBfleXcroll('content');
	}
	if(!$('.formularz').length) {
//		$('#content_mcontentwrapper').mousedown(function() { return false; });
	}
	$('#footer-info').mousedown(function() { return false; });

});

