<html>
<head>
<title><?php echo $nodeData['title']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='description' content='<?php echo $nodeData['description']; ?>' />


	<link rel="stylesheet" href="<?php echo $main_url; ?>pages/css/css.css" type="text/css" media="screen" title="default" />
	<script src="<?php echo $main_url; ?>pages/js/js.js" type="text/javascript"></script>

	
	<link rel="stylesheet" href="<?php echo $adres; ?>css/user_css.css" type="text/css" media="screen" title="default" />
	
	<script type="text/javascript" src="<?php echo $adres; ?>js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="<?php echo $adres; ?>js/jquery.dimensions.js"></script>
	<script type="text/javascript" src="<?php echo $adres; ?>js/jquery.positionBy.js"></script>
	<script type="text/javascript" src="<?php echo $adres; ?>js/jquery.bgiframe.js"></script>
	<script type="text/javascript" src="<?php echo $adres; ?>js/jquery.jdMenu.js"></script>
	<link rel="stylesheet" href="<?php echo $adres; ?>css/jquery.jdMenu.css" type="text/css" />
	
	<script src="<?php echo $adres; ?>js/NFLightBox.js" type="text/javascript"></script>
	<link href="<?php echo $adres; ?>css/nf.lightbox.css" rel="stylesheet" type="text/css" media="screen" />
		
	
	<link rel="stylesheet" href="<?php echo $adres; ?>css/style.css" />
	<script type="text/javascript">
		$(document).ready(function(){
			var settings = {
				imageLoading: '<?php echo $adres; ?>images/loading.gif',
				imageBtnPrev: '<?php echo $adres; ?>images/prev.png',
				imageBtnNext: '<?php echo $adres; ?>images/next.png',
				imageBtnClose: '<?php echo $adres; ?>images/close.png',
				imageBlank: '<?php echo $adres; ?>images/lightbox-blank.gif',
				imageBtnBottomPrev: '<?php echo $adres; ?>images/btm_prev.gif',
				imageBtnBottomNext: '<?php echo $adres; ?>images/btm_next.gif',
				imageBtnPlay: '<?php echo $adres; ?>images/start.png',
				imageBtnStop: '<?php echo $adres; ?>images/pause.png'
			};
			$('#Photos a').lightBox(settings);
			$("div#menu li").click(function(){
				window.location = $(this).find('a').attr('href');
			});
			
		});
	</script>
</head>
<body>
	<div id="menu">
	<?php echo $menu; ?>
	</div>
	
	<div>
	<?php echo $nodeData['text']; ?>
	<?php if($modulesArray) foreach($modulesArray as $module) { 
		if($module->getType() == "Tekst") {
			if($module->getContent() && $module->getContent()->num_rows()>0){
				$row = $module->getContent()->row();
				echo '<div style="padding-top: 10px; padding-bottom: 10px;">'.$row->text_content.'</div>';
			}
		} else if($module->getType() == "Galeria") {
			if($module->getContent() && $module->getContent()->num_rows()>0) { 
			?>
				
				<ul id="Photos">
					<?php foreach ($module->getContent()->result() as $photo) { ?>
						<li class="ui-state-default" id="photo_<?php echo $photo->ID_photos; ?>">
							<a title="<?php echo $photo->photos_header; ?>" href="<?php echo $main_url.'foto/'.$photo->photos_name; ?>" target='blank'><img src="<?php echo $main_url; ?>foto/thumb_<?php echo $photo->photos_name; ?>" /></a>
							<p class="photoHeader"><?php echo $photo->photos_header; ?></p>
							<p class="photoHeader"><?php echo $photo->photos_description; ?></p>
							
						</li>
					<?php } ?>
				</ul>
				
				<div class="clear"></div>
				<br/>
				
				<?php } ?>
		<?php 
		} else if($module->getType() == "Galeria wideo") { ?>
				<ul id="Photos">
					<?php foreach ($module->getContent()->result() as $video) { ?>
						<li class="ui-state-default" id="video_<?php echo $video->ID_videos; ?>">
							<?php if($video->videos_type == "outsidelink") echo $video->videos_name; 
									else if($video->videos_type == "file") { ?>
										<object id="MediaPlayer1"
											width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
											classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
											codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
											standby="Loading Microsoft® Windows® Media Player components..."
											type="application/x-oleobject">		
											<param name="FileName" value="<?php echo $main_url.'video/'.$video->videos_name; ?>" />
											<param name="animationatStart" value="true" />
											<param name="transparentatStart" value="true" />
											<param name="autoStart" value="false" />
											<param name="showControls" value="true" />
											<param name="Volume" value="0" />
											<embed type="application/x-mplayer2"
												pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
												src="<?php echo $main_url.'video/'.$video->videos_name; ?>"
												name="MediaPlayer1"
												width="<?php echo $rozmiar->x; ?>" height="<?php echo $rozmiar->y; ?>"
												autostart="false">
												
											</embed>
										</object>
									<?php } ?>
							
							<p class="photoHeader"><?php echo $video->videos_header; ?></p>
							<p class="photoHeader"><?php echo $video->videos_description; ?></p>
							
						</li>
					<?php } ?>
				</ul>
				
				<div class="clear"></div>
				<br/>
		<?php }
		
	}
	?>
	</div>

</body>
</html>