var timer;





 $(document).ready(function() {
    $('#ph').click(function(){
      var offset = $('#header .page_margins').offset();
      var offsetP = $('#p').offset();
      
      
      
      var agent = navigator.userAgent.toLowerCase();
      if(agent.search('msie 6.0') != -1)
      {
        var top = $('#p').height() + 2;
        var left = - $('#p').width() + 18;
      }else {
        var left = offsetP.left - offset.left;
        var top = offsetP.top - offset.top + $('#p').height();
      }
   
   
      
      
      
      
      $('#productlist').css('left',left+'px');
      $('#productlist').css('top',top+'px');
     $('#productlist').show('blind',function(){
       clearTimeout(timer);
     });
   });
   $("#productlist").mouseout(function(){
     timer = setTimeout('out()',50);
   });
   $("#productlist").mouseover(function(){
     clearTimeout(timer);
   });
});


  $(document).ready(function() {
     $('#example1').bxSlider({
        mode: 'slide',
        speed: 250,
        wrapper_class: 'example1_container',
        auto: 'true',
        width: 230,
        pause: 10000,
        next_text: 'weiter',
     	prev_text: 'zur&uuml;ck',
        controls: false    
     }); 
	    }); 
  

   
function out() 
{
   $('#productlist').hide('blind');
} 
 
 


	$(function() {
		$('#p').autocomplete({
			minLength: 0,
			source: projects,
			focus: function(event, ui) {
				$('#p').val(ui.item.label);
				return false;
			},
			select: function(event, ui) {
    window.location.href = ui.item.value;
				return false;
			}
		})
		.data( "autocomplete" )._renderItem = function( ul, item ) {
			return $( "<li></li>" )
				.data( "item.autocomplete", item )
				.append( "<a>" + item.label + "</a>" )
				.appendTo( ul );
		};
	});



	$(function() {
   $("a[rel=lightbox[roadtrip]]").ooBox({        
      title:"off",
      titlePos:"off",
      type:"roadtrip",
      auto:"on",
      language:"de",
      textCloseDe:"schliessen X"
   });
   $("a[rel=_box]").ooBox({    
      width:"820px",   
      height:"80%",
      title:"none",
      titlePos:"none",
      type:"iframe",
      auto:"off",
      language:"de",
      textCloseDe:"schliessen X"
   });
});

 
 function pro()
 {
  window.location.href = $('#url').val();
 }
 
 
 

