/* fsSlides Slideshow Engine and Transition Manager Copyright 2009 FolioSnap, Globalcentric LLC Unauthorized Use Strictly Prohibited */ $(function(){ // function: fsSlides window.fsSlides = function(trans) { if(trans == "fade") { $(".slides").css("opacity",1); // needed in IE(6) to prevent outerbg bleed-through! $(".slides:first").fadeOut(1500,function(){ $(this).remove().insertAfter(".slides:last").css("z-index",0); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ).show() }); }); } else if(trans == "blink") { $(".slides").not(".slides:first").hide(); $(".slides:first").fadeOut(750,function(){ $(".slides:eq(1)").fadeIn(750,function(){ $(".slides:first").remove().insertAfter(".slides:last").css("z-index",0); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ) }); }); }); } else if(trans == "slideleft") { $(".slides:eq(1)").animate({marginLeft:940},1,function(){ $(".slides:first").animate({marginLeft:-940},1500); $(".slides:eq(1)").animate({marginLeft:0},1500,function(){ $(".slides:first").remove().insertAfter(".slides:last").css("z-index",0).animate({marginLeft:0},1); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ) }); }); }); } else if(trans == "slidedown") { $(".slides:eq(1)").animate({marginTop:-480},1,function(){ $(".slides:first").animate({marginTop:480},1500); $(".slides:eq(1)").animate({marginTop:0},1500,function(){ $(".slides:first").remove().insertAfter(".slides:last").css("z-index",0).animate({marginTop:0},1); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ) }); }); }); } else if(trans == "revealleft") { $(".slides:first").animate({marginLeft:-940},1500,function(){ $(this).remove().insertAfter(".slides:last").css("z-index",0).animate({marginLeft:0},1); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ) }); }); } else if(trans == "revealdown") { $(".slides:first").animate({marginTop:480},1500,function(){ $(this).remove().insertAfter(".slides:last").css("z-index",0).animate({marginTop:0},1); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ) }); }); } else if(trans == "flyin") { $(".slides:eq(1)").animate({marginLeft:-940,marginTop:-480},1,function(){ var zindex_one = $(".slides:first").css("z-index"); var zindex_two = $(".slides:eq(1)").css("z-index"); $(".slides:first").css("z-index",zindex_two); $(".slides:eq(1)").css("z-index",zindex_one); $(".slides:eq(1)").animate({marginLeft:0,marginTop:0},1500,function(){ $(".slides:first").remove().insertAfter(".slides:last").css("z-index",0); $(".slides").not(".slides:first").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ) }); }); }); } else { $(".slides:first").fadeOut(1,function(){ $(this).remove().insertAfter(".slides:last").css("z-index",0); $(".slides").each(function(){ $(this).css("z-index", parseInt($(this).css("z-index")) + 1 ).show() }); }); } } // start slideshow if more than one image //if($(".slides").length > 1) slideshowrunning = setInterval("fsSlides(homeslide_trans)",homeslide_speed); });