
/*get height*/
function height(){
	var left = document.getElementById('left').offsetHeight;
	var content = document.getElementById('content').offsetHeight;
	if(content < left){
		document.getElementById('content').style.height=(document.getElementById('left').offsetHeight+50)+"px";
	}
}


/*Set lable color red*/
function lable(Field){
	document.getElementById(Field).style.color="red";
}


/*Slider*/
$(document).ready(function(){
    $(".slide").click(function(){
    	$("#panel_more").slideToggle("slow");
		$(this).toggleClass("active");
       	return false;
    });

    
    $(".slide2").click(function(){
        $("#panel_more2").slideToggle("slow");
        $(this).toggleClass("active");
        return false;
	});

    $(".slide3").click(function(){
       	$("#panel_more3").slideToggle("slow");
     	$(this).toggleClass("active");
        return false;
	});

    $(".slide4").click(function(){
       $("#panel_more4").slideToggle("slow");
   		$(this).toggleClass("active");
        return false;
	});

    $(".slide5").click(function(){
        $("#panel_more5").slideToggle("slow");
   		$(this).toggleClass("active");
        return false;
	});

    $(".slide6").click(function(){
        $("#panel_more6").slideToggle("slow");
   		$(this).toggleClass("active");
        return false;
	});
	$(".slide7").click(function(){ 
        $("#panel_more7").slideToggle("slow");
        $(this).toggleClass("active");
        return false;
	});
	
	$(".slide8").click(function(){
    	$("#panel_more8").slideToggle("slow");
		$(this).toggleClass("active");
    	return false;
	});
	$(".slide9").click(function(){ 
        $("#panel_more9").slideToggle("slow");
        $(this).toggleClass("active");
        return false;
	});
	
	$(".slide10").click(function(){
    	$("#panel_more10").slideToggle("slow");
		$(this).toggleClass("active");
    	return false;
	});
	
	$(".slide11").click(function(){
    	$("#panel_more11").slideToggle("slow");
		$(this).toggleClass("active");
    	return false;
	});
	$(".slide12").click(function(){
    	$("#panel_more12").slideToggle("slow");
		$(this).toggleClass("active");
    	return false;
	});
	$(".slide13").click(function(){
    	$("#panel_more13").slideToggle("slow");
		$(this).toggleClass("active");
    	return false;
	});
	$(".slide14").click(function(){
    	$("#panel_more14").slideToggle("slow");
		$(this).toggleClass("active");
    	return false;
	});
	
	
/*Fancybox*/	
    $("a[rel=Klemmschloss]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

    $("a[rel=Ratsche]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});

    $("a[rel=standards]").fancybox({
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'autoScale'		: false,
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});	
    
}); 


/*Scroll top*/
$(document).ready(function() {
	$('a[href*=#]').bind("click", function(event) {
		event.preventDefault();
		var ziel = $(this).attr("href");

		$('html,body').animate({
			scrollTop: $(ziel).offset().top
		}, 2000 , function (){location.hash = ziel;});
});
return false;
});

/*Selectbox bags*/
$(document).ready(function() {
    $('#selectbox_1').change(function(){
      var id_hauptkategorie = $(this).children('option:selected').val();
      $('#checkbox_ger').load("produkte/Specials/TaschenFarben.php",{value: id_hauptkategorie});
      $('#checkbox_en').load("produkte/Specials/TaschenFarben-En.php",{value: id_hauptkategorie});
    });
 }); 

