// suckerfish helper JS for dropdowns in IE
/*
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
*/


$(document).ready(function() {
	
	// Select country div
	$('#selectCountry_button').click(function(){
		if( $('#selectCountry').position().top != 0){
			$('#selectCountry').animate({ 
    	    	top: 0
        	}, 1000 );
        } else {
       		$('#selectCountry').animate({ 
    	    	top: -114
        	}, 500 );
        }
        return false;
	});	
	
	
	// Testimonial / textlight behaviour
	$('.testimonial').hide();
	$('.textlight > .bodytext > a').click(function(){
		$(this).parents('.textlight').children('.testimonial').slideToggle('slow');
		return false;
	});

	$('.testimonial:not(a)').click(function(){
		$(this).hide();
	});

	
	
	
	// Superfish navigation: Main navi
	$('ul#mainnav').superfish({ 
  	delay:       1000,                            // one second delay on mouseout 
    animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
    speed:       'slow',                          // faster animation speed 
    autoArrows:  false,                           // disable generation of arrow mark-up 
    dropShadows: false                            // disable drop shadows 
	}); 


	// Superfish navigation: Content navi
	$('ul#nav').superfish({ 
  	delay:       1000,                            // one second delay on mouseout 
    animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
    speed:       'slow',                          // faster animation speed 
    autoArrows:  false,                           // disable generation of arrow mark-up 
    dropShadows: false                            // disable drop shadows 
	}); 
	
	
	//Zebra style tables
	$("table.table-figures tbody tr:odd").addClass("odd");
	
});

