$(window).load(function() {
	$('#slider').nivoSlider({
		effect:'sliceDown', //Specify sets like: 'fold,fade,sliceDown'
		slices:20,
		animSpeed:1000,
		pauseTime:8000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
		controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:true, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});
/*
$(document).ready(function(){
	$("#lbl_search").autocomplete('inc/search.inc.php',{
		minChars: 1, width:248,
		 extraParams: {
			gender: function() { return $("#gender").val(); }
		}
	});
});
*/
$(document).ready(function(){
	$("#lbl_brand").autocomplete('inc/search_brands.inc.php',{
		minChars: 1, width:138, autoFill: true, mustMatch: true
	});
	$("#lbl_brand").result(function(event,data) {		
		$("#lbl_brand").val(data[0]);		
		$("#hdn_brand").val(data[1]);			
	});	
});

function del_value(ID, color) {
	if(document.getElementById(ID).value==document.getElementById(ID).defaultValue){
		document.getElementById(ID).value='';
		document.getElementById(ID).style.color = color;
	}
}

function default_value(ID, color){	
	if(document.getElementById(ID).value==''){
		document.getElementById(ID).value = document.getElementById(ID).defaultValue;
		document.getElementById(ID).style.color = color;
	}
}

function reset_value(ID, color){	
		document.getElementById(ID).value = document.getElementById(ID).defaultValue;
		document.getElementById(ID).style.color = color;
}

function hide_box(box_id, show_link_id, hide_link_id){
	document.getElementById(box_id).style.display='none';
	document.getElementById(show_link_id).style.display='';
	document.getElementById(hide_link_id).style.display='none';
}

function show_box(box_id, show_link_id, hide_link_id){
	document.getElementById(box_id).style.display='';
	document.getElementById(show_link_id).style.display='';
	document.getElementById(hide_link_id).style.display='none';
}

function show(obj,hide){
	var el = document.getElementById(obj).style;
	document.getElementById(hide).style.display = 'none';
	if(el.display != 'none'){
	el.display = 'none';
	}
	else{
		el.display = 'block';
	}
}

function disable(id){
		var input_field = document.getElementById(id).value;
		if(input_field == 'Schuhsuche' || input_field == ''){
			document.getElementById('search_button').disabled=true;
		}
		else{
			document.getElementById('search_button').disabled=false;
		}
}