$(document).ready(function()
  {
    $(".jqseolife").mouseover(function(){
   $(".jqseolife").css({"display":"none"});
    $(".jqseolife1").css({"display":"inline"});
   });
    $(".jqseolife1").mouseout(function(){
   $(".jqseolife1").css({"display":"none"});
    $(".jqseolife").css({"display":"inline"});
   });
	 $(".farba1").mouseover(function(){
   $("body").css({"background-color":"#000000"});
     });
   $(".farba2").mouseover(function(){
   $("body").css({"background-color":"#0b0b0b"});
     });
   $(".farba3").mouseover(function(){
   $("body").css({"background-color":"#171717"});
     });
   $(".farba4").mouseover(function(){
   $("body").css({"background-color":"#212121"});
     });
   $(".farba5").mouseover(function(){
   $("body").css({"background-color":"#2c2c2c"});
     });
   $(".farba6").mouseover(function(){
   $("body").css({"background-color":"#373737"});
     });
   $(".farba7").mouseover(function(){
   $("body").css({"background-color":"#434343"});
     });
   $(".farba8").mouseover(function(){
   $("body").css({"background-color":"#4d4d4d"});
     });
   $(".farba9").mouseover(function(){
   $("body").css({"background-color":"#585858"});
     });
   $(".farba10").mouseover(function(){
   $("body").css({"background-color":"#636363"});
     });
   $(".farba11").mouseover(function(){
   $("body").css({"background-color":"#6f6f6f"});
     });
   $(".farba12").mouseover(function(){
   $("body").css({"background-color":"#7a7a7a"});
     });
   $(".farba13").mouseover(function(){
   $("body").css({"background-color":"#878787"});
     });
   $(".farba14").mouseover(function(){
   $("body").css({"background-color":"#909090"});
     });
   $(".farba15").mouseover(function(){
   $("body").css({"background-color":"#9b9b9b"});
     });
   $(".farba16").mouseover(function(){
   $("body").css({"background-color":"#a6a6a6"});
     });
   $(".farba17").mouseover(function(){
   $("body").css({"background-color":"#b1b1b1"});
     });
   $(".farba18").mouseover(function(){
   $("body").css({"background-color":"#bcbcbc"});
     });
   $(".farba19").mouseover(function(){
   $("body").css({"background-color":"#c7c7c7"});
     });
   $(".farba20").mouseover(function(){
   $("body").css({"background-color":"#d3d3d3"});
     });
   $(".farba21").mouseover(function(){
   $("body").css({"background-color":"#dedede"});
     });
   $(".farba22").mouseover(function(){
   $("body").css({"background-color":"#e8e8e8"});
     });
   $(".farba23").mouseover(function(){
   $("body").css({"background-color":"#f4f4f4"});
     });
   $(".farba24").mouseover(function(){
   $("body").css({"background-color":"#ffffff"});
     });
   $(".mjqgaleria").click(function(){
 	$(".galleryi").css({"display":"inherit"});
	$(".mjqgaleria").css({"display":"none"});
	$(".mjqgaleriaa").css({"display":"inline"});
	$(".galleryiaa").css({"display":"none"});
  });
	$(".mjqgaleriaa").click(function(){
 	$(".galleryi").css({"display":"none"});
	$(".mjqgaleriaa").css({"display":"none"});
	$(".mjqgaleria").css({"display":"inline"});
	$(".galleryiaa").css({"display":"inline"});
  });
 });

var slideShow = new Array()
slideShow[0] = "01.jpg";
slideShow[1] = "02.jpg";
slideShow[2] = "03.jpg";
slideShow[3] = "04.jpg";
slideShow[4] = "05.jpg";
slideShow[5] = "06.jpg";


function fadeinSlideshow(elem, imageList, slideDuration, fadeSpeed, current) {
    // get the length of the image array.
    var listSize = imageList.length;
    // If there's no current image selected, or the value is out of the range of the
    // slideshow, then set the current image to zero.
    if (!current || current >= listSize) current = 0;
    // If there's no slide duration set, set it to 5 seconds.
    if (!slideDuration) slideDuration = 10000;
    // If there's no fade speed set, set it to 1 second.
    if (!fadeSpeed) fadeSpeed = 1000;
    // Set the image's source to the current image's url.
    $(elem + " img").attr("src", imageList[current]);
    // If the current element is at the maximum of the element size, then set the 
    // wrapper's background (aka, the next image) to the first image.
    if (current == (listSize - 1)) {
        $(elem).css("background", "transparent url(" + imageList[0] + ") no-repeat");
    } else {
    // If not, set the next image in the list to the background of the wrapper.
        $(elem).css("background", "transparent url(" + imageList[current + 1] + ") no-repeat");
    }
    // Hold the current image for a period of time equal to slideDuration. Once that's done, then
    // fade the current image's opacity until the background image shows. Once that is done, then
    // call this same function again with the next image in line.
    $(elem + " img").animate({ opacity: "1" }, slideDuration).animate({ opacity: "0.01" }, fadeSpeed, function() { $(this).css("opacity", "1"); fadeinSlideshow(elem, imageList, slideDuration, fadeSpeed, current + 1) });
} // end of function fadeinSlideshow()

function runSlideshow(){
    fadeinSlideshow("#slideshow", slideShow, 3000, 1000);
}

$(document).ready(runSlideshow);



