jQuery(document).ready(function() {
								
	$("#news").newsTicker([6000], false);
	
	$("#news_important").newsTicker([6000], false);
	
	$("#last_sold").newsTicker([12000, true]);
	
	$(".ac_input").autocomplete("/shop/search_solr_auto.php", {
		minChars: 2,
		autoFill: false,
		max: 10,
		cacheLength: 0,
		selectFirst: false,
		resultsClass: "search_ac",
		scroll: false
	});
	
	$(".ac_input").result(function(event, data, formatted) {
		$(this).parent().parent().submit();
	});
	
	$('div#cont_top ul').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 6000,
		type: 'sequence',
		clickobject: 'top_banner_overlay'
	});
});

function log(event, data, formatted) {
	$("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result");
}

function formatItem(row) {
	return row[0] + " (<strong>id: " + row[1] + "</strong>)";
}
function formatResult(row) {
	return row[0].replace(/(<.+?>)/gi, '');
}

