function menu(element,element2) {
  if (navigator.appName=="Microsoft Internet Explorer" 
	 && navigator.userAgent.indexOf("Opera")==-1) {
    typ = "block";
  } else {
    typ = "table-row";
  }
	
	for(i=1;i<=100;i++){
	if(document.getElementById(("m" + element2) + i)){
	e = document.getElementById(("m" + element2) + i);
	e.style.display = "none";
	}
	document.getElementById(element).style.display = typ;
	}
}
function produkt(opis) {
  if(opis=='opis'){

  }
  if(opis=='akcesoria'){

  }
  if(opis=='komentarze'){

  }
}
function produkty(id) {
  if (navigator.appName=="Microsoft Internet Explorer"
	 && navigator.userAgent.indexOf("Opera")==-1) {
    typ = "block";
  } else {
    typ = "table-row";
  }

  for(i=0;i<8;i++) {
  
  e1 = document.getElementById('def_prod_'+i);
  e1.style.display = 'none';
  e2 = document.getElementById('def_links_'+i);
  e2.style.backgroundImage = "url(' ')";
  
  if(id==i){
  e3 = document.getElementById('def_prod_'+i);
  e3.style.display = typ;
  e4 = document.getElementById('def_links_'+i);
  e4.style.backgroundImage = "url('img/default-pasek.gif')";
  }
  }

}
$(document).ready(function() {
    $('.oferta_opisy').hide();
    $(".oferta_opisy:eq(0)").show();
    $('#oferta_menu_linki a').click(function() {
        $('.oferta_opisy').hide();
        var idx = $("#oferta_menu_linki a").index(this);
        $(".oferta_opisy:eq(" + idx + ")").show();
        return false;
    });
});
$(document).ready(function()
{
  $("#min1 > a.mlink").click(function()
  { $("#zdj_duze > img").hide();
    $("#zdj1").show("slow");
    $("#zdj_opis > p").hide(0);
    $("#zdj_op1").show(0);
    $("#miniaturki > div").css("border-bottom","1px solid #d5d7d0");
    $("#min1").css("border-bottom","0");});
  $("#min2 > a.mlink").click(function()
  { $("#zdj_duze > img").hide();
    $("#zdj2").show("slow");
    $("#zdj_opis > p").hide(0);
    $("#zdj_op2").show(0);
    $("#miniaturki > div").css("border-bottom","1px solid #d5d7d0");
    $("#min2").css("border-bottom","0");});
  $("#min3 > a.mlink").click(function()
  { $("#zdj_duze > img").hide();
    $("#zdj3").show("slow");
    $("#zdj_opis > p").hide(0);
    $("#zdj_op3").show(0);
    $("#miniaturki > div").css("border-bottom","1px solid #d5d7d0");
    $("#min3").css("border-bottom","0");});
  $("#min4 > a.mlink").click(function()
  { $("#zdj_duze > img").hide();
    $("#zdj4").show("slow");
    $("#zdj_opis > p").hide(0);
    $("#zdj_op4").show(0);
    $("#miniaturki > div").css("border-bottom","1px solid #d5d7d0");
    $("#min4").css("border-bottom","0");});
});


function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order

    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 2000, function() {
            $active.removeClass('active last-active');
        });
}

$(document).ready(function()
{
$(function() {
    setInterval( "slideSwitch()", 7500 );
});
});
