/**************************************
# Klant:            Gast in de Klas
# Gemaakt op:       30-11-2009 
# Gewijzigd op:     30-11-2009
# Auteur:           Thom van den Hork <thomvandenhork@gmail.com>
# Bestandsnaam:     init.js
**************************************/

// Weergeven van de schaduw achter de category items
$(document).ready(function(){
    
    // Externe Links
    $('a[rev=ext]').attr('target','_blank');

    // Print link
    $('a[rel=print]').click(function(){
        window.print();
        return false; 
    });
    
        
    //cycle headers
    $('.headers').cycle({
        fx:         'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
        timeout:    20000,  // milliseconds between slide transitions (0 to disable auto advance) //100000 = lang
        random:     1     // true for random, false for sequence (not applicable to shuffle fx)  0 = default
    });


});

$(document).ready(function(){
    //align sponsor pics
    $('.sponsor_slideshow img').each(function(){
       
       if(  $(this).width() > $(this).height()  ){
            $(this).addClass('liggend'); 
            $(this).css('width','190px');
            var $_hoogte =  ( 205 - $(this).height() ) / 2;
            $(this).css('margin-top',$_hoogte); 
            var $_breedte =  ( 205 - $(this).width() ) / 2;
           $(this).css('margin-left',$_breedte);
       }else{
           $(this).addClass('staand'); 
           $(this).css('height','190px');
           var $_hoogte =  ( 205 - $(this).height() ) / 2;
            $(this).css('margin-top',$_hoogte); 
            var $_breedte =  ( 205 - $(this).width() ) / 2;
           $(this).css('margin-left',$_breedte); 
       }
        
    });

    //cycle sponsors   
    $('.sponsor_slideshow').cycle({
        fx: 'scrollUp',
        continuous:1,
        speed:         8000,  // speed of the transition (any valid fx speed value)  1000 = default
        timeout:       0  // milliseconds between slide transitions (0 to disable auto advance)  4000 = default
        //speedIn:       0.1,  // speed of the 'in' transition 
        //speedOut:      0.1  // speed of the 'out' transition 
        //easing:        1  // easing method for both in and out transitions 
    });

    
    
});