// JavaScript Document
function toggledisplay (id, indicator){ 
	if (document.getElementById) { 
		var obj = document.getElementById(id);
		var pic = document.getElementsByName(indicator);
		obj.style.display = (obj.style.display=='block'?'none':'block');
		pic[0].src = (obj.style.display=='block'?'templates/images/collapse.png':'templates/images/expand.png');
	} else if(document.all) { // IE
		id.style.display = (id.style.display=='block'?'none':'block');
		indicator.src = (id.style.display=='block'?'templates/images/collapse.png':'templates/images/expand.png');
	} else if (document.layers) { // Netscape 4.x
		document.id.style.display = (document.id.style.display=='block'?'none':'block');
		document.indicator.src = (document.id.style.display=='block'?'templates/images/collapse.png':'templates/images/expand.png');
	}
}

function changeLimit(site,that)
{
    document.location.href="index.php?site=kat=" + that.value;
}

jQuery(window).bind("load", function() {
	jQuery("div#slider1").codaSlider()
});
$(window).ready(function () {
  $('div.sliderGallery').each(function () {
    var ul = $('ul', this);
    var productWidth = ul.innerWidth() - $(this).outerWidth();

    var slider = $('.slider', this).slider({ 
      handle: '.handle',
      minValue: 0, 
      maxValue: productWidth, 
      slide: function (ev, ui) {
        ul.css('left', '-' + ui.value + 'px');
      }, 
      stop: function (ev, ui) {
        ul.animate({ 'left' : '-' + ui.value + 'px' }, 500, 'linear');
      }
    });
  });
});

