/* NAVIGATION HOVER ON PRODUCTS */
$(function() {
	$('#mouseOverHead').hide();
	$('#mouseOverBody').hide();
	$('#mainNavi li.page-item-7 a').mouseover(function() {
    	$('#mouseOverHead').fadeIn('fast');
    	$('#mouseOverBody').fadeIn('fast');
    	return false;
    });  
    $('#mouseOverHead').hover(
		function() {
			$('#mouseOverHead').show();
			$('#mouseOverBody').show();
        }
     );    
     $('#mouseOverBody').hover(
		function() {
			$('#mouseOverHead').show();
			$('#mouseOverBody').show();
        },
        function() {
    		$('#mouseOverHead').fadeOut('slow');
    		$('#mouseOverBody').fadeOut('slow');        
    	}
     );
});

/* NAVIGATION HOVER ON SEARCH */
$(function() {
	$('#searchMouseOver').hide();
	$('#mainNavi li.search a').mouseover(function() {
    	$('#searchMouseOver').fadeIn('fast');
    	
    	return false;
    });
    $('#searchMouseOver').hover(
		function() {
			$('#searchMouseOver').show();
			
        },
        function() {
    		$('#searchMouseOver').fadeOut('slow');	
        }
     );
});

/* NAVIGATION HOVER CLAIMS ON PRODUCTS HOVER */
$(function() {
	$('#mouseOverBody div.claim span').hide();
	
	$('#mouseOverBody li.page-item-27 a').hover(
    	function() {
			$('#mouseOverBody div.claim span.taloom').fadeIn('fast');
			
        },
        function() {
    		$('#mouseOverBody div.claim span.taloom').fadeOut('fast'); 		
        }
    );     
    $('#mouseOverBody li.page-item-46 a').hover(
    	function() {
			$('#mouseOverBody div.claim span.peppertrace').fadeIn('fast');
			
        },
        function() {
    		$('#mouseOverBody div.claim span.peppertrace').fadeOut('fast'); 		
        }
    );   
    $('#mouseOverBody li.page-item-160 a').hover(
    	function() {
			$('#mouseOverBody div.claim span.jopo').fadeIn('fast');
			
        },
        function() {
    		$('#mouseOverBody div.claim span.jopo').fadeOut('fast'); 		
        }
    );    
    $('#mouseOverBody li.page-item-57 a').hover(
    	function() {
			$('#mouseOverBody div.claim span.jobtric').fadeIn('fast');
			
        },
        function() {
    		$('#mouseOverBody div.claim span.jobtric').fadeOut('fast'); 		
        }
    );  
    $('#mouseOverBody li.page-item-67 a').hover(
    	function() {
			$('#mouseOverBody div.claim span.jff').fadeIn('fast');
			
        },
        function() {
    		$('#mouseOverBody div.claim span.jff').fadeOut('fast'); 		
        }
    ); 
    $('#mouseOverBody li.page-item-77 a').hover(
    	function() {
			$('#mouseOverBody div.claim span.talentpool').fadeIn('fast');
			
        },
        function() {
    		$('#mouseOverBody div.claim span.talentpool').fadeOut('fast'); 		
        }
    );   
});


/* TOOLTIP ON KEY FEATURES */
$(function() {
	$(".trigger").tooltip({
		position: ['center', 'right'],	
		offset: [10, 0]
	});
});

/* OVERLAY ON PRODUCTS PAGE */
$(function() {
    $("a[rel]").overlay({
		// closeOnClick: false,
		finish: { top: 260 }
	});
});

/* QUICKFINDER TABS */
$(function() {
	$("#tabs").tabs("#panes > div");
});

/* REPLACE SELECTBOX FOR ARCHIVE */
$(function() {
	$("#archive").selectbox();
});

/* SCROLLABLE CONTENT ON HOME PAGE */
$(function() {         
         
    // initialize scrollable  
    $("div.scrollable").scrollable({ 
        size: 1, 
        items: '#stages',   
         // items are auto-scrolled in 4 secnod interval 
        interval: 6000, 
         
        // when last item is encountered go back to first item 
        loop: true,  
         
        // make animation a little slower than the default 
        speed: 300,
         
        // when seek starts make items little transparent 
        onBeforeSeek: function() { 
             this.getItems().fadeTo(200, 0.2);         
         }, 
         
        // when seek ends resume items to full transparency 
         onSeek: function() { 
             this.getItems().fadeTo(100, 1); 
         } 
    });    
     
});

/* COMMENT FORM VALIDATION */
$(function() {
	var errorContainer = $("<div class='error'>Bitte die Pflichtfelder ausf&uuml;llen.</div>").appendTo("#commentform").hide();
	var errorLabelContainer = $("<div class='error errorlabels'></div>").appendTo("#commentform").hide();
	$("#commentform").validate({
		rules: {
			author: "required",
			email: {
				required: true,
				email: true
			},
			url: "url",
			comment: "required"
		},
		errorContainer: errorContainer,
		errorLabelContainer: errorLabelContainer,
		ignore: ":hidden"
	});
	$.validator.messages.required = "";
	$.validator.messages.email = "Bitte eine g&uuml;ltige Email Adresse angeben.";
	$.validator.messages.url = "Bitte die URL mit &laquo;http://&raquo; angeben";
});



/* SYNC HEIGHTS OF DIVS CONTENT AND SIDEBAR */
$(document).ready(function(){
	$(".equalHeight").syncHeight();
	$(window).resize(function(){ //if you want to update the columns after a Browser resize (optional)
		$(".equalHeight").syncHeight();
	});
});

/* ADD TAG IN LISTS TO ARCHIVE SAME LIST STYLE IMAGE IN ALL BROWSERS */
$(function() {     
	$("#main .content ul li").prepend("<i></i>");
	$("#blogMain .content ul li").prepend("<i></i>");
	/* $("ul.listItem li").prepend("<i></i>"); */
});
