$(document).ready(function() {	    
	$("nav.top li").hover( function(e) {
    	    $(this).children('a').addClass('hover');
	        $(this).children('ul').fadeIn('fast');
	    }, function() {
	        $(this).children('a').removeClass('hover');
	        $(this).children('ul').fadeOut('fast');         
	    });    
	if($('.referenzen').length) {    


	}    
	if($('.referenzen').length) {
		$('.referenzen').movingBoxes({
			startPanel   : 1,      // start with this panel
			width        : 960,    // overall width of movingBoxes (not including navigation arrows)
			wrap         : true,   // if true, the panel will "wrap" (it really rewinds/fast forwards) at the ends
			buildNav     : false,   // if true, navigation links will be added
			navFormatter : function(){ return "&#9679;"; },
			currentPanel: 'is_active',
			panelWidth: 0.4,
			reducedSize: 1,
			completed: function(e, slider, tar){
				$(this).find('.is_active').addClass('active');
			},
			beforeAnimation: function(e, slider, tar){
				$(this).find('.item').removeClass('active');		
			},
			initialized: function(e, slider, tar){
				$(this).find('.item').removeClass('active');	
				$(this).find('.item').eq(tar-1).addClass('active');
				$(this).removeClass('loading');
			}
			
		});
	}
	if($('.mitarbeiter').length) {
		$('.mitarbeiter').movingBoxes({
			startPanel   : 2,      // start with this panel
			width        : 960,    // overall width of movingBoxes (not including navigation arrows)
			wrap         : true,   // if true, the panel will "wrap" (it really rewinds/fast forwards) at the ends
			buildNav     : false,   // if true, navigation links will be added
			navFormatter : function(){ return "&#9679;"; },
			currentPanel: 'is_active',
			panelWidth: 0.4,
			reducedSize: 1,
			completed: function(e, slider, tar){
				$(this).find('.is_active').addClass('active');
			},
			beforeAnimation: function(e, slider, tar){
				$(this).find('.item').removeClass('active');		
			},
			initialized: function(e, slider, tar){
				$(this).find('.item').removeClass('active');	
				$(this).find('.item').eq(tar-1).addClass('active');
				$(this).removeClass('loading');
			}
			
		});	
	}

  
	
	if($('.scroll-pane')) {	
		$('.scroll-pane').jScrollPane();
	}
	

});
