 /**
 * alle global benutzten api-Aufrufe und Funktionen
 * f.d. globale Suchbox mit Google-CSE-Autocomplete
*/

 google.load('search', '1', {language : 'de'});
  
        function globalInputFocus() {
        document.getElementById('global-query-input').value = '';
      }
 
      function globalInputBlur() {
        var queryInput = document.getElementById('global-query-input');
        if (!queryInput.value) {
          queryInput.value  = 'Suche';
        }
      }
 
      
    function globalFormInit() {
		 google.search.CustomSearchControl.attachAutoCompletion(
            '013910909065993692681:y0yz-stafo4',
            document.getElementById('global-query-input'),
            'two-page-form');
			globalInputBlur();
      }
 
	  
 
      function submitGlobalQuery() {
        window.location = 'suche.html?q='
            + encodeURIComponent(document.getElementById('global-query-input').value);
        return false;
      }
 
 
      google.setOnLoadCallback(globalFormInit);



var $j = jQuery.noConflict();






// sync height and add classes

$j(document).ready(function(){
	$j('.standardbox').find('h1:first').css('margin-top', '0');
	$j('.standardbox > div > div h2').first().css('margin-top', '0');
	
	// $j('.gallerylarge').append('<div id="loadingtxt" style="position:absolute; top:20px; left:20px; font-family:Arial, Verdana;">...loading</div>');
	
	/* ---->>> in thickbox.js
	$j('a[href|="zukunftsfonds-projekte.html"]').attr({
		href:'zukunftsfonds-projekte.html?height=460&width=990',
		title: 'Der Zukunftsfonds ermöglicht hunderte Projekte in Kärnten',
		class: 'thickbox'
		}); */


});
   
//initialize after images are loaded 
$j(window).load(function(){

	// $j("#loadingtxt").remove();
	
		$j('.gallerylarge').cycle({
			fx: 'fade',
			sync:0,
			random:1,
			speed:4000,
			timeout:100
		}); 
});

