
$(document).ready(function(){

    /* Banners */
    $(".block").hover(function(){
        $(this).addClass("alt");
        Cufon.replace($(this).find('h4'), { color:'#fff' });
        Cufon.replace($(this).find('span'), { color:'#fff' });
        Cufon.replace($(this).find('a'), { color:'#fff' });
    }, function(){
        $(this).removeClass("alt");
        Cufon.replace($(this).find('h4'), { color:'#454545' });
        Cufon.replace($(this).find('span'), { color:'#808080' });
        Cufon.replace($(this).find('a'), { color:'#808080' });
    });
    
    /* Orbit slider */
    $('#orbitslider').orbit({
        animation: 'fade',                  // fade, horizontal-slide, vertical-slide, horizontal-push
        animationSpeed: 800,                // how fast animtions are
        timer: false, 			 // true or false to have the timer
        advanceSpeed: 4000, 		 // if timer is enabled, time between transitions 
        pauseOnHover: false, 		 // if you hover pauses the slider
        startClockOnMouseOut: false, 	 // if clock should start on MouseOut
        startClockOnMouseOutAfter: 1000, 	 // how long after MouseOut should the timer start again
        directionalNav: true, 		 // manual advancing directional navs
        captions: true, 			 // do you want captions?
        captionAnimation: 'fade', 		 // fade, slideOpen, none
        captionAnimationSpeed: 800, 	 // if so how quickly should they animate in
        bullets: false,			 // true or false to activate the bullet navigation
        bulletThumbs: false,		 // thumbnails for the bullets
        bulletThumbLocation: '',		 // location from this file where thumbs will be
        afterSlideChange: function(){} 	 // empty function 
    });
    
    /* Switch list view */
    $("a.switch-thumb").toggle(function(){
        $(this).addClass("swap");
        $("ul.display").fadeOut("fast", function() {
            $(this).fadeIn("fast").addClass("lista");
            $(this).removeClass("matrice");
            Cufon.replace('.content-block h4');
        });
    }, function () {
        $(this).removeClass("swap");
        $("ul.display").fadeOut("fast", function() {      
            $(this).fadeIn("fast").addClass("matrice");
            $(this).removeClass("lista");
            Cufon.replace('.content-block h4');
        });
    });     
           
});



