$(document).ready (function (){

	//sub menu - can't use css because of sIFR
	$("li.mainnav, #nav_categories li").mouseover(function() {
		$(this).find("ul").addClass("hover");
	}).mouseout(function() {
		$(this).find("ul").removeClass("hover");
	});
	
	//language choice hover rolldown - from http://www.viget.com/inspire/fun-with-jquerys-animation-function/
	var navDuration = 150; //time in miliseconds
	var navJumpHeight = "10px";

	//$('#lang-choice').hover(function() {
    //	$(this).animate({ marginTop : "+="+navJumpHeight }, navDuration);            
	//}, function() {
    //	$(this).animate({ marginTop : "-10px" }, navDuration);
	//});
	
	//video embed
	//$('#extras .extra-video').flash({
    //	src: '/assets/resources/video.swf',
	//   width: 240,
    //	height: 180
	//});
	
	//$('#banner-fade').cycle({ 
	 //   fx:      'fade', 
    	//speed:    1000, 
//	    timeout:  4000 
	//});

	//slide services list
	$("#case-studies-rotate").cycle({
		fx:	'scrollLeft'
	});
	
	//slide services list
	$("#quotes-rotate").cycle({
		fx:	'scrollLeft',
		speed:    1250, 
	    timeout:  7500 
	});
	
	//news scroller 
	$("#ticker").ticker({
 		cursorList:  " ",
 		rate:        15,
 		delay:       1500
	}).trigger("play");
	
	//equal height columns
	equalHeight($(".contact-gb"));
	equalHeight($(".contact-shm"));
	equalHeight($(".contact-usa"));
		
});


//equal height columns
function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

