// ---- 9c74205b25_minify_slideShow.js
$(document).ready(function(){slideShowItems=$('#slideShow').children("div");slideShowItems.css('display','none');slideShowIndex='';slideShowSpeed='500';initSlideShowNav();nextSlideShowItem(slideShowIndex);});function nextSlideShowItem(slideShowIndex){if(slideShowIndex==''){$(slideShowItems[0]).fadeIn(slideShowSpeed);slideShowIndex=1;}
else if(slideShowIndex<slideShowItems.length){$(slideShowItems[slideShowIndex-1]).fadeOut(slideShowSpeed);$(slideShowItems[slideShowIndex]).fadeIn(slideShowSpeed);slideShowIndex++;}
else{$(slideShowItems[slideShowIndex-1]).fadeOut(slideShowSpeed);$(slideShowItems[0]).fadeIn(slideShowSpeed);slideShowIndex=1;}
$('#slideShowNav a').removeClass('active');$('#slideShowNav a[rel='+(slideShowIndex-1)+']').addClass('active');sliderTimeoutId=setTimeout("nextSlideShowItem("+slideShowIndex+")",5000);}
function initSlideShowNav()
{for(i=0;i<slideShowItems.length;i++){$('#slideShowNav').append('<a href="#" title="" rel="'+i+'"><span>'+i+'</span></a>');}
$('#slideShowNav a').click(function(){if(!$(this).hasClass('active')){clearTimeout(sliderTimeoutId);slideShowItems.fadeOut(500);nextSlideShowItem($(this).attr('rel'));$('#slideShowNav a').removeClass('active');$(this).addClass('active');return false;}});};
// ---- 22e2e15e73_minify_filter.projects.js
var $projects;var speed=500;var $sort=0;$(document).ready(function(){$projects=$('#projects');initSorting();setSorting();setFilter();resetFilter();showLatestSeen();showAllLastSeen();sortItems();setLastSeenCookie();});function initSorting()
{$('#sorting option').attr('selected',false);$('#sorting option:eq('+$sort+')').attr('selected',true);$('.filter').jqTransform();}
function setSorting()
{$('.filter').bind('customEvent',function(e){var selector=$('#sorting option:selected').attr('value');$('.item').tsort('h2[class='+selector+']',{returns:true});$('.item').tsort('span[class='+selector+']',{order:"desc",returns:true});$sort=$('#sorting')[0].selectedIndex;$.ajax('/?eID=projectSortSession&sort='+$sort);sortItems();});}
function setFilter()
{if($cat!=''){$projects.children('.item').addClass('hide');$('#filter li a').each(function(index){if($cat.indexOf(index+1)!=-1){$(this).addClass('checked');$projects.children('.'+$(this).attr('id')).removeClass('hide');}});}
$('#filter li a').unbind('click').click(function(){if($(this).hasClass('checked')){$(this).removeClass('checked');}else{$(this).addClass('checked');}
$projects.children('.item').addClass('hide');var counter=0;$cat='';$('#filter li a').each(function(index){if($(this).hasClass('checked')==true){$projects.children('.'+$(this).attr('id')).removeClass('hide');counter++;if($cat==''){$cat=(index+1);}
else{$cat=$cat+','+(index+1);}}});if(counter==0){$projects.children('.item').removeClass('hide');$cat='0';}
writeSession();sortItems();return false;});}
function writeSession(){$.ajax('/?eID=projectCatSession&cat='+$cat);}
function killSession(){$.ajax('http://www2.dynamogold.at/?eID=killSession');}
function resetFilter()
{$('#reset').click(function(){$('#filter li a.checked').removeClass('checked');$projects.children('.item').removeClass('hide');sortItems();$cat='0';writeSession();return false;});}
function randomXToY(minVal,maxVal,floatVal){var randVal=minVal+(Math.random()*(maxVal-minVal));return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);}
function sortItems(isHome)
{var lH,index2;if(isHome==undefined)
{isHome=false;}
$projects.children().not('.hide').each(function(index,item)
{index2=index+1;if(index2%2==0)
{lH=randomXToY(202,202);}
else
{lH=randomXToY(328,328);}
if(index2%3==0)
{lH=randomXToY(272,272);}
if(index2==4&&isHome)
{lH=328;}
if(index2==5&&isHome)
{lH=324;}
if(index2==6&&isHome)
{lH=268;}
$(item).css({height:lH}).find('div.image').css({height:lH-2});});setTimeout('masonryOrder()',0)}
function masonryOrder()
{$projects.masonry({columnWidth:240,itemSelector:'.item:not(.hide)',animate:true,animationOptions:{duration:speed,queue:true}});$projects.children().not('.hide').fadeIn(speed);$projects.children('.hide').fadeOut(speed);}
function showLatestSeen()
{$ref=document.referrer;$arrRef=$ref.split('/');if($.inArray("detail",$arrRef)!=-1){$('#box_last_seen img:first').hide();$('#box_last_seen img:first').delay('800').fadeIn('slow','easeInElastic');}
$('#box_last_seen div.marked img').each(function(index,img)
{$('#projects .item .more a').each(function(index2,title)
{if($(img).attr('alt')==$(title).text()){$(title).parent().parent().addClass('lastSeen');}})});var cookieData=$.cookie('allLastSeen');var lastSeenProjects=new Array();if(cookieData!=null){var lastSeenProjects=cookieData.split(';');$.each(lastSeenProjects,function(index,title)
{$('#projects .item .more a').each(function(index2,title1)
{if(title==$(title1).text()){$(title1).parent().parent().addClass('lastSeen');}})});}}
function setLastSeenCookie(){var cookieData=$.cookie('allLastSeen');$('.item').click(function(){if(cookieData==null){cookieData=$(this).find('a').text();}
else{cookieData+=';'+$(this).find('a').text();}
$.cookie('allLastSeen',cookieData);});}
function showAllLastSeen()
{$('#showLastSeen').css('display','none');if($('#box_last_seen .thumb .image img').length>0){$('#showLastSeen').css('display','inline-block');$('#showLastSeen').click(function()
{$('#projects .item').addClass('hide');$('#projects .lastSeen').removeClass('hide');$('#c40').before('<div id="btn_overview" class="grid_3_ mb_10" style="display:none;"><span class="btn_overview mb_10"><a href="/" title="">Zurück zur Übersicht</a></span></div>');$('#btn_overview').fadeIn('slow');$('#c40').slideUp('slow');$('#showLastSeen').parent().hide();overView();sortItems();return false;});}}
function overView()
{$('#btn_overview').find('a').click(function(){$('#btn_overview').slideUp('slow',function(){$(this).remove();})
$('#c40').slideDown('slow');$('#showLastSeen').parent().show();$projects.children('.lastSeen').addClass('hide');$('#filter li a').each(function(index){if($cat==0){$('#projects .item').removeClass('hide');}
else{if($(this).hasClass('checked')==true){$('#projects').children('.'+$(this).attr('id')).removeClass('hide');}}});sortItems();return false;});};

