<script language="javascript" src="{$jspath}/jgalslide.js" type="text/javascript"></script>
<script language="javascript" src="{$jspath}/jcycle.js" type="text/javascript"></script>
{literal}

<script type="text/javascript">
<!-- //
$(document).ready(function()
{
	$('div.toggles_fastupload').toggleElements( { fxAnimation:'hide', fxSpeed:'normal', className:'toggler'} );
	$('div.toggles_mostseen').toggleElements( { fxAnimation:'hide', fxSpeed:'normal', className:'toggler'} );
	
	$('#s1').cycle();//{ fx: 'scrollDown' }
	
});

function mycarousel_itemLoadCallback(carousel, state)
{
    if (carousel.has(carousel.first, carousel.last)) {
        return;
    }
	
    jQuery.get('index.php?a=1&p=gallery&action=ajaxtop&id={/literal}{$smarty.request.id}&ascdesc={$smarty.request.ascdesc}&categ={$smarty.request.categ}{literal}',
        {
            first: carousel.first,
            last: carousel.last
        },
        function(xml) {
            mycarousel_itemAddCallback(carousel, carousel.first, carousel.last, xml);
        },
        'xml'
    );
};


function mycarousel_itemAddCallback(carousel, first, last, xml)
{
    carousel.size(parseInt(jQuery('total', xml).text()));
	jQuery('image', xml).each(function(i) {
        carousel.add(first + i, mycarousel_getItemHTML(jQuery(this).text()));
    });
};

function mycarousel_getItemHTML(url)
{
    return url;
	//return '<img border="0" src="' + url + '"  alt="" />';
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
		itemLoadCallback: mycarousel_itemLoadCallback
		{/literal}{if $browser == 'Firefox' || $browser == 'IE7'},scroll:4,visible:5{/if}{literal}
    });
});
// -->
</script>

{/literal}




<div class="box_innerhead">{$Gallery_inf->TitleGalName|koobispecialchars}</div>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
    {#Gallery_InfStart#} {$Gallery_inf->Datum|date_format:$config_vars.DateFomatSimple} {#Gallery_InfBy#} {$Gallery_inf->AutorLink|specialchars} {#Gallery_InfStart2#} {$Gallery_inf->Images} {#Gallery_InfStart3#}
    {if $Gallery_inf->GalText}<br />
    <br /><strong>{#Gallery_InfDescr#}</strong><br />{$Gallery_inf->GalText|sslash}{/if} 
    
    {if $subGalleries}
    <p>&nbsp;</p>
    <strong>{#Gallery_IncludedSub#}</strong>
    <br />
    {foreach from=$subGalleries item=subgallery name=subgalleries}
    <a href="{$subgallery->Link}">{$subgallery->SubGalName|specialchars}</a>{if !$smarty.foreach.subgalleries.last},&nbsp;{/if}
    {/foreach}
    <br />
    {/if} 
    </td>
    <td>
    <div class="gallery_fadebox">
	<div id="s1" class="gallery_fadebox_pics">
    {foreach from=$items item=gal name=BilderArray name=sls}
    <a href="index.php?p=gallery&amp;action=showimage&amp;id={$gal->Id}&amp;galid={$smarty.request.id}&amp;ascdesc={$smarty.request.ascdesc|default:'desc'}&amp;categ={$smarty.request.categ}&amp;area={$area}"><img class="" src="{$gal->Thumbnail}" alt="" border="0" /></a>
    {/foreach}
    </div>
    </div>
    </td>
  </tr>
</table>
<br />

{*
<script language="javascript" type="text/javascript">
<!--
$(document).ready(function() 
{ldelim}
	$(".xxx a").fancybox({ldelim}
		'zoomSpeedIn':	500, 
		'zoomSpeedOut':	500, 
		'overlayShow':	true
	{rdelim}); 
{rdelim});
// -->
</script>

<div class="xxx">
{foreach from=$items item=gal name=BilderArray}
<a rel="imgDiashow" href="{$gal->Thumbnail_Normal}">{$gal->Thumbnail_Normal}</a>
{/foreach}
</div>
*}

{*-------------------- Favoriten --------------------*}

<div class="gallery_actions">
<!-- FAVORITEN-LINK -->
{if $Galsettings->Favoriten==1}
{if $smarty.session.user_group!=2}
    {if $smarty.request.favorites==1}
	<a href="index.php?p=gallery&amp;action=showgallery&amp;id={$smarty.request.id}&amp;categ={$smarty.request.categ}&amp;name={$Gallery_inf->GalName|koobispecialchars}"><img class="absmiddle" src="{$imgpath_page}faves.png" alt="" border="0" /></a>&nbsp;&nbsp;<a href="index.php?p=gallery&amp;action=showgallery&amp;id={$smarty.request.id}&amp;categ={$smarty.request.categ}&amp;name={$Gallery_inf->GalName|koobispecialchars}&amp;area={$area}">{#Gallery_ShowAllImages#}</a> 
    {if $items}&nbsp;&nbsp;
    <img class="absmiddle" src="{$imgpath_page}delete_small.png" alt="" border="0" />&nbsp;<a href="index.php?action=delete_allfavorites&amp;p=gallery&amp;galid={$smarty.request.id}&amp;categ={$smarty.request.categ}&amp;name={$Gallery_inf->GalName|koobispecialchars}">{#Gallery_DelFavorites#}</a>
    {/if}
    {else}
    {if get_active('gallery_favorites')}<a href="index.php?p=gallery&amp;action=showgallery&amp;id={$smarty.request.id}&amp;categ={$smarty.request.categ}&amp;name={$Gallery_inf->GalName|koobispecialchars}&amp;favorites=1"><img class="absmiddle" src="{$imgpath_page}faves.png" alt="" border="0" /></a>&nbsp;&nbsp;<a href="index.php?p=gallery&amp;action=showgallery&amp;id={$smarty.request.id}&amp;categ={$smarty.request.categ}&amp;name={$Gallery_inf->GalName|koobispecialchars}&amp;favorites=1&amp;area={$area}">{#Gallery_ShowFavorites#}</a>{/if}
    {/if}
{/if}
{/if}

    {foreach from=$items item=gal name=BilderArray name=sls}
    {if $smarty.foreach.sls.first}
    &nbsp;<a href="javascript:void(0);" {popup text=$config_vars.Gallery_OpenInDiashow} onclick="open_window('index.php?p=gallery&amp;action=showimage&amp;id={$gal->Id}&amp;galid={$smarty.request.id}&amp;blanc=1&amp;first_id={$Gallery_inf->First->Id}&amp;ascdesc={$smarty.request.ascdesc|default:'desc'}&amp;categ={$smarty.request.categ}','',800,800,1)"><img class="absmiddle" src="{$imgpath_page}diashow.png" alt="{#Gallery_Diashow#}" border="0" /></a> <a href="javascript:void(0);" {popup text=$config_vars.Gallery_OpenInDiashow} onclick="open_window('index.php?p=gallery&amp;action=showimage&amp;id={$gal->Id}&amp;galid={$smarty.request.id}&amp;blanc=1&amp;first_id={$Gallery_inf->First->Id}&amp;ascdesc={$smarty.request.ascdesc|default:'desc'}&amp;categ={$smarty.request.categ}&amp;area={$area}','',800,800,1)">{#Gallery_Diashow#}</a>
    {/if}
{/foreach}




<!-- FAVORITEN-LINK  -->
</div>

{if !$items}
<h2>{#Gallery_NoImages#}</h2>
<br />
{else}




{*-------------------- Biler --------------------*}
<div class="gallery_pic_box">
<div id="x">

<table width="100%" cellpadding="0" cellspacing="1">
<tr>
{foreach from=$items item=gal name=BilderArray}
{assign var=c value=$c+1}
<td class="gallery_box">
<div style="text-align:center">
<div class="gallery_box_ani"><a href="index.php?p=gallery&amp;action=showimage&amp;id={$gal->Id}&amp;galid={$smarty.request.id}&amp;ascdesc={$smarty.request.ascdesc|default:'desc'}&amp;categ={$smarty.request.categ}&amp;area={$area}"><img class="gallery_box_img" src="{$gal->Thumbnail}" alt="" border="0" /></a></div>
</div>
</td>

{if $c % $Galsettings->Bilder_Zeile==0 &&! $smarty.foreach.BilderArray.last}
</tr><tr>
{/if}


{/foreach}
</tr>
</table>
</div>
</div>
{/if}

{*-------------------- Slideshow Tophits --------------------*}
{if $Galsettings->Meist_Gesehen==1 && $smarty.request.favorites!=1}
<br />
<div class="box_innerhead">Meist gesehene Bilder</div>
<div class="jcarousel_div">
<div id="mycarousel" class="jcarousel-slider">
<script type="text/javascript">
<!-- //
	document.write('<ul></ul>');
// -->
</script>
</div>
</div>
{/if}
<br />

{*-------------------- Navigation --------------------*}
{if $GalNavi}{$GalNavi}<br />{/if}

{*-------------------- Sortierung --------------------*}
<form method="post" action="index.php">
<input type="hidden" name="p" value="gallery" />
<input type="hidden" name="action" value="showgallery" />
<input type="hidden" name="id" value="{$smarty.request.id}" />
<input type="hidden" name="categ"  value="{$smarty.request.categ}" />
<input type="hidden" name="name"  value="xxx" />

<select class="input" name="ascdesc">
<option value="desc" {if $smarty.request.ascdesc == "desc"}selected="selected"{/if}>{#NewestFirst#}</option>
<option value="asc" {if $smarty.request.ascdesc == "asc"}selected="selected"{/if}>{#OldestFirst#}</option>
</select>

<select class="input" name="pp">
<option value="{$Galsettings->Bilder_Seite}" {if $smarty.request.pp == $galsettings->Bilder_Seite}selected="selected"{/if}>{$Galsettings->Bilder_Seite} {#Gallery_ImagesPP#}</option>
{section name=pp loop=95 step=5}
<option value="{$smarty.section.pp.index+10}" {if $smarty.request.pp == $smarty.section.pp.index+10}selected="selected"{/if}>{$smarty.section.pp.index+10} {#Gallery_ImagesPP#}</option>
{/section}
</select>
<input type="hidden" name="page"  value="1" />
{if $smarty.request.favorites==1}<input type="hidden" name="favorites"  value="1" />{/if}
<input type="submit" class="button" value="{#Gallery_PPButton#}" />
</form>










