	jQuery(window).bind("load", function() {
		jQuery("div#slider1").codaSlider();
	});
	$().ready(function() {

/* Shop Accordion begin */
		var wizard = $("#wizard").accordion({
			header: '.title',
			event: false,
			clearStyle: true
		});
//		var wizardButtons = $([]);
//		$("div.title", wizard).each(function(index) {
//			wizardButtons = wizardButtons.add($(this)
//			.next()
//			.children(":button")
//			.filter(".next, .previous")
//			.click(function() {
//				alert('foo');
//				wizard.accordion("activate", index + ($(this).is(".next") ? 1 : -1))
//			}));
//		});

/* Shop Accordion end */


		$('#nav .kwicks').kwicks({max:200,spacing:2,defaultKwick:1,sticky:1})
		//$('#kwick'+jQuery.url.attr("anchor")).mouseover();
		$('#kwick'+parseInt(jQuery.url.attr("anchor"))).mouseover();
		$("div#nav UL").mouseout(function(){$('#kwick'+parseInt(jQuery.url.attr("anchor"))).mouseover()});
		$(".cross-link").click(function(){contentClick(parseInt(jQuery(this).attr('href').slice(1)))});
		$('.content').fadeOut(1);

		//setTimeout("$('#test').show().fadeIn('slow');", 5000);
		
$("#finalize").click(function(){
	document.getElementById("finalize").onclick = function(){return false;}
	$.post("/index.php?id=19",$("#orderform").serialize(), function(text){
//		alert("Finito:"+text);
		document.getElementById("wizard").innerHTML='<p>Danke für Ihre Bestellung</p>';
	});
});


	});
	function contentClick(id){
		$('#kwick'+id).mouseover();
	}
	function fadeIn(delay,easetime){
		if(!delay)delay=500;
		if(!easetime)easetime=500;
		setTimeout("$('.content"+(parseInt(jQuery.url.attr("anchor")))+"').fadeIn("+easetime+");",delay); 
	}
	function fadeOut(id){
		setTimeout("$('.content"+(id)+"').hide();",100); 
	}

if(screen.width>1024)document.write('<link rel="stylesheet" type="text/css" media="screen" href="fileadmin/templates/center.css" />');



$(function() {
	$('a.lightbox').lightBox({
	overlayBgColor: '#EFEFD5',
	overlayOpacity: 0.9,
	imageLoading: 'http://www.weingut-hoellerer.at/fileadmin/templates/img/lightbox-ico-loading.gif',
	imageBtnClose: 'http://www.weingut-hoellerer.at/fileadmin/templates/img/lightbox-btn-close.gif',
	imageBtnPrev: 'http://www.weingut-hoellerer.at/fileadmin/templates/img/lightbox-btn-prev.gif',
	imageBtnNext: 'http://www.weingut-hoellerer.at/fileadmin/templates/img/lightbox-btn-next.gif',
	containerResizeSpeed: 350,
	txtImage: 'Flasche',
	txtOf: 'von'
   }); // Select all links with lightbox class
});