/**
 * @author MotorByte Software GmbH, Stefanie Janine Stoelting
 */

var addressName = 'http://www.ixs-technicaldivision.de/index.php';
//var addressName = 'http://www.ixs-technicaldivision.ch/index.php';
//var addressName = 'http://testshop.hostettler.com/ixs-technicaldivision/index.php';
//var addressName = 'http://testshop.hostettler.com/ixs-technicaldivision.ch/index.php';

$(document).ready(function() {
	$("ul#dittoticker").liScroll({travelocity: 0.05});

	if (document.getElementById('newsContent')) {
		$('#newsContent').height(document.documentElement.clientHeight - 280)
	}
	
	// Blaetterkatalog in der Hoehe dynamisch
	if (document.getElementById('catalogue')) {
		var catHeight = document.documentElement.clientHeight - 160;
		if (catHeight < 600) {
			catHeight = 600;
		}
		$('#catalogue').height(catHeight);
	}
	
	tooltip();
	
	if (document.getElementById('zip')) {
		$autocomplete = $('<ul id="autocomplete"></ul>').hide().insertAfter('#buttonbar');
		// auto complete article search
		$("#zip").autocomplete(addressName + '?id=8&function=ZIPSuggestAutocomplete&ccode=' + $('#customercountry').val(), {
			autoFill: true,
			cacheLength: 0,
			minChars: 0
		});
		
	}
	
	if (document.getElementById('customersTable')) {
		initTableWidget('customersTable', $('#content').width(), document.documentElement.clientHeight - 300, Array('S','N','S','S','S',false,false))
	}
});

