/**
 * Javascript-Functions - PROJECT
 * (c) CLICKSPORTS DIGITAL SOLUTIONS
 * http://www.clicksports.de
 * 
 * $Rev: 2184 $
 * $Author: mw $
 * $Date: 2010-07-19 15:07:42 +0200 (Mo, 19 Jul 2010) $
 */

//Cufon Section 
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('#phone');
Cufon.replace('a.lev-0', { hover: true });
 
jQuery(document).ready(function() {

		//Fancybox Section
        jQuery('.contents a img').removeAttr('ismap');

        var allowedExtensions = ['jpg', 'jpeg', 'png', 'gif'];
        jQuery.each(jQuery('.contents a'), function() {
                
                var myext_arr = jQuery(this).attr('href').split('.');
                if(jQuery.inArray(myext_arr[myext_arr.length-1], allowedExtensions) !== -1) {
                        
                        jQuery(this).select
                        jQuery(this).fancybox();
                }
        });

        jQuery('.images a').fancybox();

		/* Adding a colortip to any tag with a title attribute: */
		$('.contents [title]').colorTip({color:'blue'});        
        
        //Accordion Section
        $(function() {
			$( "#content_accordion" ).accordion();
		});
        
       
});

//SLIDER SECTION
$(window).load(function() {
	        
		    $('#slider').nivoSlider({
		        effect:'fade', //Options: sliceDown, sliceDownLeft, sliceUp, sliceUpLeft, sliceUpDown, sliceUpDownLeft, fold, fade, random / Specify sets like: 'fold,fade,sliceDown'
		        slices:15,
		        animSpeed:1000, //Slide transition speed
		        pauseTime:5000,
		        startSlide:0, //Set starting Slide (0 index)
		        directionNav:false, //Next & Prev
		        directionNavHide:false, //Only show on hover
		        controlNav:false, //1,2,3...
		        controlNavThumbs:false, //Use thumbnails for Control Nav
		        controlNavThumbsFromRel:false, //Use image rel for thumbs
		        controlNavThumbsSearch: '.jpg', //Replace this with...
		        controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		        keyboardNav:false, //Use left & right arrows
		        pauseOnHover:false, //Stop animation while hovering
		        manualAdvance:false, //Force manual transitions
		        captionOpacity:0.8, //Universal caption opacity
		        beforeChange: function(){},
		        afterChange: function(){},
		        slideshowEnd: function(){}, //Triggers after all slides have been shown
		        lastSlide: function(){}, //Triggers when last slide is shown
		        afterLoad: function(){} //Triggers when slider has loaded
		    });
});

