// Quelle: http://code.google.com/p/jquery-autocomplete/source/browse/jquery.autocomplete.js  ...Erweiterung von http://docs.jquery.com/Plugins/Autocomplete (siehe oben)

$(document).ready(function() {
	
	$(function() {
		$('#fulltext').autocomplete(autoSuggestURL, {
			minChars : 3,
			resultsClass: 'iconACDropDown',
			delay : 500,
			mustMatch : false,
			selectFirst : false,
			selectOnly : false,
			autoFill : false,
			matchSubset: 256,
			matchContains: 128,
			scroll: true,
			scrollHeight : 512,
			cacheLength : 512,
			multiple : false,
			multipleSeparator : ""
		});
	});
	
	$(function() {
		$('#context').autocomplete(autoContextURL, {
			minChars : 3,
			resultsClass: 'iconACDropDown',
			delay : 500,
			mustMatch : false,
			selectFirst : false,
			selectOnly : false,
			autoFill : false,
			matchSubset: 256,
			matchContains: 128,
			scroll: true,
			scrollHeight : 512,
			cacheLength : 512,
			multiple : false,
			multipleSeparator : ""
		});
	});
	
	
	
	 // Scan drucken  => jquery.jqprint.0.3.js
	 $(".print-scan a").click(function(){		
		var o = $(".facsimile span a img");
		o.jqprint();
		return( false );
	 	}
	 )
	 ;
	
	
	
//	$('.coll2 .coll2Visible1:even').css('background-color','grey');
	
	
	 //Drilldownmenue zeigt nur die ersten 8 Items in der Liste und danach ein "Mehr" bzw. "Weniger" Link um die Liste ganz zu oeffnen (multilingual)
	  $('ul.drillDown').each(function(){
		  $.more = $('.hidden a:first-child').text();
		  $.less = $('.hidden a:last-child').text();
		  var $this = $(this), lis = $this.find('li:gt(20)').hide();
		  	if(lis.length>0){
		  		$this.append($("<li class='more'>").append($("<a>").text($.more)).click(function(){
		  				lis.toggle();
		  				$(this).find('a').text($(this).text() === $.more ? $.less : $.more);
		  			}));
		  		}
		  });
	
	  //erzeugt in der Collection den rechten roten Rand
	  $('.coll2Visible1Selected').parent().parent().parent().addClass('coll2Border');
	  
//	  $('.contextSnippet:even').css('background-color','#CCDBB3');
	
});
