/* - hofegger.js - */
// http://hofegger.com/portal_javascripts/hofegger.js?original=1
(function($){$(document).ready(function(){if($('body').hasClass('kssActive')){$('#portal-personaltools-wrapper').show(0)}
if($('#leadbar-wrap-homepage').length){window.setTimeout(function(){$('#homepage-text1').css({'visibility':'visible'})},1000);$('.hhidden').delay(6000).fadeTo(4000,0, function(){$(this).css({color:'#FFFFFF'})});if($('#leadbar-homepage-link').length){$('#homepage-text1').addClass('imglink');$('#homepage-text1').click(function(){location.href=$('#leadbar-homepage-link').attr('href')})}}
if($('#leftimglink').length){$('#leftimg').addClass("jqlink");$('#leftimg').mouseover(function(){$('#leftimg .arrow-small').attr('src','/arrow_small_hover.png')});$('#leftimg').mouseout(function(){$('#leftimg .arrow-small').attr('src','/arrow_small.png')});$('#leftimg').click(function(){location.href=$('#leftimglink').attr('href')})}
if($('#contentimglink').length){$('#contentimg').addClass("jqlink");$('#contentimg').mouseover(function(){$('#contentimg .arrow-small').attr('src','/arrow_small_hover.png')});$('#contentimg').mouseout(function(){$('#contentimg .arrow-small').attr('src','/arrow_small.png')});$('#contentimg').click(function(){if($("#contentimglink[href^='http']").not("[href*='hofegger.']").length){window.open($('#contentimglink').attr('href'))}
else{location.href=$('#contentimglink').attr('href')}})}
if($('.contentimg-link').length){$('.contentimg-link').parents('.contentimg').addClass("jqlink");$('.contentimg-link').parents('.contentimg').mouseover(function(){$('.arrow-small',this).attr('src','/arrow_small_hover.png')});$('.contentimg-link').parents('.contentimg').mouseout(function(){$('.arrow-small',this).attr('src','/arrow_small.png')});$('.contentimg-link').parents('.contentimg').click(function(){if($(".contentimg-link[href^='http']",this).not("[href*='hofegger.']").length){window.open($('.contentimg-link',this).attr('href'))}
else{location.href=$('.contentimg-link',this).attr('href')}})}
$('#facebook').mouseover(function(){$(this).attr('src','/facebook_hover.png')});$('#facebook').mouseout(function(){$(this).attr('src','/facebook.png')});$('#kontakt').mouseover(function(){$(this).attr('src','/kontakt_hover.png')});$('#kontakt').mouseout(function(){$(this).attr('src','/kontakt.png')});if($('.list-project').length){$('.list-project').click(function(){location.href=$(this).children('a').attr('href')});$('.list-project').mouseover(function(){$(this).children('h4').children('img').attr('src','/list-project_hover.png');$(this).children('img').addClass('lp-hover')});$('.list-project').mouseout(function(){$(this).children('h4').children('img').attr('src','/list-project.png');$(this).children('img').removeClass('lp-hover')})}
function thumbon(thumbobj){$('.projectimage-thumb').removeClass('selected');thumbobj.addClass('selected')}
if($('#projectimage').length){$('#prev-img').mouseover(function(){$(this).attr('src','/prev_project_hover.png')});$('#prev-img').mouseout(function(){$(this).attr('src','/prev_project.png')});$('#next-img').mouseover(function(){$(this).attr('src','/next_project_hover.png')});$('#next-img').mouseout(function(){$(this).attr('src','/next_project.png')});$('#backtoprojects').mouseover(function(){$(this).attr('src','/backto_projects_hover.png')});$('#backtoprojects').mouseout(function(){$(this).attr('src','/backto_projects.png')});if(!$('#projectimage img.projectimage-selected').length){$('#projectimage img:first').removeClass('projectimage-hidden').addClass('projectimage-selected');$('#projectimage-thumbs .projectimage-thumb:first').addClass('selected')}
$('#projectimage img').click(function(){if($(this).next('.projectimage-hidden').length){thumb=$('#'+$(this).next('.projectimage-hidden').attr('related')).parent();$('.projectimage-thumb').removeClass('selected');$(this).fadeOut('slow', function(){$(this).removeClass('projectimage-selected').addClass('projectimage-hidden');thumbon(thumb)});$(this).next('.projectimage-hidden').fadeIn('slow', function(){$(this).removeClass('projectimage-hidden').addClass('projectimage-selected');thumbon(thumb)})}
else{location.href=$('#project-prevnext #next').attr('href')}});$('#projectimage img').mouseover(function(){if(!$(this).next('.projectimage-hidden').length){$('#next-img').attr('src','/next_project_hover.png')}});$('#projectimage img').mouseout(function(){if(!$(this).next('.projectimage-hidden').length){$('#next-img').attr('src','/next_project.png')}});$('#projectimage-thumbs .projectimage-thumb').click(function(){thumb=$(this);$('.projectimage-thumb').removeClass('selected');var showid='#'+$(this).children('img').attr('related');if(showid!='#'+$('.projectimage-selected').attr('id')){$('.projectimage-selected').fadeOut('slow', function(){$(this).removeClass('projectimage-selected').addClass('projectimage-hidden');thumbon(thumb)});$(showid).fadeIn('slow', function(){$(this).removeClass('projectimage-hidden').addClass('projectimage-selected');thumbon(thumb)})}
else{$('.projectimage-selected').hide(0,function(){$(this).removeClass('projectimage-selected').addClass('projectimage-hidden');thumbon(thumb)});$(showid).show(0,(function(){$(this).removeClass('projectimage-hidden').addClass('projectimage-selected');thumbon(thumb)}))}})}})})(jQuery);

