<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="/public/js/Smooth-Div-Scroll/js/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script src="/public/js/Smooth-Div-Scroll/js/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="/public/js/Smooth-Div-Scroll/js/jquery.smoothDivScroll-1.2.js" type="text/javascript"></script>



<script type="text/javascript">
	var $j=jQuery.noConflict();

	jQuery(document).ready(function() {
		var valtasido = 800;
		
		$j('.lapoz').live('click', function(){
		  lapozas($j(this).attr("rel"));
		  
		  var kulso = $j(this);
		  
		  $('.lapozkep').each(function(){
			
			
			if( $j(this).attr("rel") == kulso.attr("rel") ){
				$j(this).css('border','1px solid #494949');
			}else{
				$j(this).css('border','0px none');
			}
		  });
		  
		  
		});
		
		$j('.lapozkep').live('click', function(){
		  lapozas($j(this).attr("rel"));
		  $j('.lapozkep').css('border','0px none');
		  $j(this).css('border','1px solid #494949');
		});
		
		$j('.letoltlink').live('click', function(){
			var objid = $j(this).attr("rel");
			var verzio = $j(this).attr("name");
			var url   = '/collection2/downloadplus/'+objid+'/'+verzio;
			
			$j.ajax({
				url: url
			});
		});
		
		function lapozas(objid){
		  if( objid ){
			elotte();
			setTimeout(function(){getHTML2(objid);},valtasido);
		  }
		}
		
		function getHTML2(ertek){
			<?if( !isset($vurl) || !$vurl):?>var vurl = '/<?=PREURL?>collection2/detailssimple/'+ertek;
			<?else:?>var vurl = '<?=$vurl?>'+ertek;
			<?endif;?>
			
			var betolto = $j.ajax({
				url: vurl,
				success: function(data) {
					$j('#objektumreszletek').html(data);
					$j('#objektumreszletek').animate({
						opacity: 1
						}, {
						duration: valtasido
					});
					$j('.sotetdoboz').animate({
						opacity: 0.8
						}, {
						duration: valtasido
					});
					
					lapozokszine();
					
				}
			});
		}
		
		function elotte(){
			$j('#objektumreszletek').animate({
					opacity: 0.0
				}, {
				duration: valtasido
			});
			$j('.sotetdoboz').animate({
					opacity: 0.0
				}, {
				duration: valtasido
			});
		}
		
		function lapozokszine(){
			var relbal = $j('#elozodiv div').attr('rel');
			if( relbal == "" ){
				$j('#elozodiv').css('background','#aaaaaa');
			}else{
				$j('#elozodiv').css('background','#3a3a3a');
			}
			
			var reljobb = $j('#kovidiv div').attr('rel');
			if( reljobb == "" ){
				$j('#kovidiv').css('background','#aaaaaa');
			}else{
				$j('#kovidiv').css('background','#3a3a3a');
			}
		}
		
		
		$j('.sotetdoboz').animate({
			opacity: 0.8
		}, {
			duration: 1
		});
		
		lapozokszine();
		
		
		$j('.kepelem').css('width','75px');
		$j('.kepelem').css('height','70px');
		$j('.kepelem').css('margin-right','7px');
		
		
		$j('#makeMeScrollable').smoothDivScroll({
			visibleHotSpotBackgrounds: "always",
			manualContinuousScrolling: false
		});
		
	});
</script>








<div id="collectionheader" <?if(hun()):?>style="background: url(/public/img/collection/stilus/header_bemutatoterem.png)"<?else:?>style="background: url(/public/img/collection/stilus/header_showroom.png)"<?endif;?>>
	<div class="collbal">
		<div class="collheadbal3">
			<?if(isset($gyarto->dir) && $gyarto->dir!=""):?>
			<img src="/public/img/collection/<?=$gyarto->dir?>/logo.png" width="237" height="122" alt="" />
			<?else:?>
			<img src="/public/img/collection/nologo.png" width="237" height="122" alt="" />
			<?endif;?>
		</div>
	</div>
	
	<div class="collheadbal2">
		<div class="colheadback detcattit">
		<? hun() ? print $kat->nev_hun : print $kat->nev_eng; ?>
		</div>
		<?if( isset($search,$_SESSION['shsearch']) && $search===true && $_SESSION['shsearch'] ):?>
		<a class="colheadback" href="/<?=$this->uri->segment(1)?>/search/<?=urlencode($_SESSION['shsearch'])?>">
			<img src="/public/img/collection/stilus/arrow_back.png" alt="vissza" /> &nbsp;<?=lang('collec2_visszker')?>
		</a>
		<?else:?>
		<a class="colheadback" href="/<?=$this->uri->segment(1)?>/category/<?=$adatok->c_id?>">
			<img src="/public/img/collection/stilus/arrow_back.png" alt="vissza" /> &nbsp;<?=lang('backcategory')?>
		</a>
		<?endif;?>
		<?=$this->load->view('collection2/searchform')?>
	</div>
	
</div>

<div class="clear"></div>


<div id="befoglalo">
	
	<div id="objektumreszletek">
		
		<?if($_SERVER['REMOTE_ADDR']!='188.36.216.113' ):?>
		<?=$this->load->view('temp/detailssimple')?>
		<?else:?>
		<?//print $_SERVER['HTTP_USER_AGENT'];?>
		<?=$this->load->view('collection2/detailssimple_new')?>
		<?endif;?>
	
	</div>
	
	
	<div class="clear"></div>
	
	<div id="makeMeScrollable">
	<?foreach($kepek as $kep):?>
		<img src="/<?=$kep->kep2?>" width="79" height="66" alt="" class="lapozkep" rel="<?=$kep->o_id?>" <?if($kep->o_id == $adatok->o_id):?>style="border: 1px solid #000;"<?endif;?> />
	<?endforeach;?>
	</div>
	
	
</div>
