$(document).ready(function() {
	
    $(".sportart").click(function(evt) {
        evt.preventDefault();
        var vis = $("#subnav").css('display');
        if( vis == 'none' ){
            $("#subnav").fadeIn("fast");
        } else
        {
            $("#subnav").fadeOut("fast");
        }
    });
	
    $(document).mouseup(function(e) {
        if ($(e.target).closest("#subnav").size()) return;        
        $("#subnav").fadeOut("fast");
    }); 
	
	
	$('.slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		speed: 1000,
		timeout: 4000
	});
	
	
		
	$('.facebook').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-blue',		
		innerHtml: 'Werde ein Fan von uns auf Facebook!',
		position: 'top',
		align: 'center'
	});
	
	$('.guenter').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Günter Schmitt',
		position: 'top',
		align: 'center'
	});
	
	$('.karin').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Karin Schmitt',
		position: 'top',
		align: 'center'
	});
	
		$('.niclas').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Niclas Schmitt',
		position: 'top',
		align: 'center'
	});
	
		$('.mateja').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Mateja Schmitt',
		position: 'top',
		align: 'center'
	});
	
		$('.ilona').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Ilona Orth',
		position: 'top',
		align: 'center'
	});
	
		$('.timo').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Timo Kiefer',
		position: 'top',
		align: 'center'
	});
	
		$('.elena').CreateBubblePopup({ 
		themePath: 'wp-content/themes/aktivsport/js/jquerybubblepopup-theme',
		themeName: 'all-black',		
		innerHtml: 'Elena Först',
		position: 'top',
		align: 'center'
	});
	
	
	
	  $("a.panorama").fancybox({
		'href'					: 'http://www.aktivsport-goldbach.de/wp-content/themes/aktivsport/panorama/bereich1.html',
        'autoScale'             : false,
        'transitionIn'          : 'fade',
        'transitionOut'         : 'fade',
        'width'                 : 800,
        'height'                : 400,
        'type'                  : 'iframe'
    }); 
	
	
		  
});



