﻿


function pageShow() {
$('#pageSlideshow').cycle({
        fx:     'scrollHorz',
        speed:  'fast',
        timeout: 0,
        pager:  '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#nav li:eq(' + (idx) + ') a';
        }
    });

    
}
function projectShow() {
$('#projectSlideshow').cycle({
        fx:     'scrollHorz',
        speed:  'slow',
        timeout: 2000
    });

    
}

//Frontpage slideshow
function scrolling() {

$('#slideshow img:first').fadeIn(1000, function() {
    $('#slideshow').cycle({ 
    fx: 'scrollHorz',
    speed:    1000, 
    timeout:  0,
    next:   '#next', 
    prev:   '#prev' , 
    before: onBefore,
    after:   onAfter 
    });
});
    
}

function onAfter() { 
    //$('#slidetext').hide("slow");
    $('#slidetext').fadeIn("slow");
}

function onBefore() { 
    var h2 = $('#teaserText'+this.id).html();    
    $('#slidetext').fadeOut("slow",function(){ $('#slidetext').html(h2);Cufon.refresh();  });
       
}


function mouseOverProject(url) {         
    //$('#projectSlideshow').html('<img src="'+url+'" />');
    $('#projectSlideshow').cycle('pause'); 
    $('#projectSlideshow').hide();
    $('#chosenSlide').html('<img src="'+url+'" />'); 
    $('#chosenSlide').show();
}
function mouseOutProject() {     
    $('#projectSlideshow').cycle('resume');     
    $('#projectSlideshow').show();
    $('#chosenSlide').hide();
}


function fade(){
    $('#s3').cycle({ 
        fx:    'fade', 
        speed:  2500 
    });
}




