jQuery(document).ready(function () { //Start - center text in intro buttons $('div#intro > div .mainpagetypeButton > div').each(function(){ $(this).css('top',function(){ return 67 - Math.round($(this).height()/2); }); }); //End - center text in intro buttons //Start - functions for intro mainpagetypeSkipintro jQuery('div.mainpagetypeSkipintro').click(function(){ document.location.href = jQuery(this).find('a').attr('href'); }); //End - functions for intro mainpagetypeSkipintro //Start - functions for intro mainpagetypeImage jQuery('div#intro .mainpagetypeImage').parent().find('a img').mouseenter(function() { jQuery(this).css({opacity: 0.7}); }); jQuery('div#intro .mainpagetypeImage').parent().find('a img').mouseleave(function(event) { jQuery(this).css({opacity: 1.0}); }); jQuery('div#intro .mainpagetypeImage').mouseenter(function(){ jQuery(this).parent().find('a img').css({opacity: 0.7}); }); jQuery('div#intro .mainpagetypeImage').mouseleave(function(){ jQuery(this).parent().find('a img').css({opacity: 1.0}); }); //End - functions for intro mainpagetypeImage //Start - functions for mainnavigation (imagenavigation) jQuery('#bildmenu li a').parent().find('a:not(".active") img').mouseenter(function() { jQuery(this).css({opacity: 0.7}); }); jQuery('#bildmenu li a').parent().find('a:not(".active") img').mouseleave(function() { jQuery(this).css({opacity: 1.0}); }); jQuery('#bildmenu li a').mouseenter(function() { jQuery(this).parent().find('a:not(".active") img').css({opacity: 0.7}); }); jQuery('#bildmenu li a').mouseleave(function() { jQuery(this).parent().find('a:not(".active") img').css({opacity: 1.0}); }); //End - functions for mainnavigation (imagenavigation) }); //Start - functions for map switch var neutral = '/images/karte_neutral.jpg'; var bern = '/images/bern_mittelland_basel.jpg'; var ostschweiz = '/images/ostschweiz_graubuenden.jpg'; var westschweiz = '/images/westschweiz_wallis_tessin_biel_seeland.jpg'; var zuerich = '/images/zuerich_zentralschweiz.jpg'; // load map neutral function resetimage(){ jQuery(document).ready(function() { jQuery('#verkaufsregionen img').attr('src', neutral); jQuery('#wrapper #maincontent article #teamdetail > ul > li > a').removeClass('active'); }); } // load selected map function changeimage(mapid){ jQuery(document).ready(function(){ switch(mapid){ case '1': jQuery('#verkaufsregionen img').attr('src', bern); jQuery('#wrapper #maincontent article #teamdetail > ul > li:nth-child(2) > a').addClass('active'); break; case '2': jQuery('#verkaufsregionen img').attr('src', ostschweiz); jQuery('#wrapper #maincontent article #teamdetail > ul > li:nth-child(3) > a').addClass('active'); break; case '3': jQuery('#verkaufsregionen img').attr('src', westschweiz); jQuery('#wrapper #maincontent article #teamdetail > ul > li:nth-child(1) > a').addClass('active'); break; case '4': jQuery('#verkaufsregionen img').attr('src', zuerich); jQuery('#wrapper #maincontent article #teamdetail > ul > li:nth-child(4) > a').addClass('active'); break; default: jQuery('').attr('src', neutral); break; } }); } function changeImgFromList(mapid){ jQuery(document).ready(function(){ switch(mapid){ case '2': jQuery('#verkaufsregionen img').attr('src', bern); break; case '3': jQuery('#verkaufsregionen img').attr('src', ostschweiz); break; case '1': jQuery('#verkaufsregionen img').attr('src', westschweiz); break; case '4': jQuery('#verkaufsregionen img').attr('src', zuerich); break; default: jQuery('').attr('src', neutral); break; } }); } //End - functions for map switch