// MM Site JavaScript Document

$(document).ready(function() {

$('#whatwedo').cycle({
			timeout: 0,	
			speed:   500,
			fx: 'scrollLeft'
					 });

$('#wwd').click(function(){
				$('#whatwedo').cycle(0);
				return false;		 
						 });

$('#comsec').click(function(){
				$('#whatwedo').cycle(1);
				return false;
						 
						 });

$('#pubsec').click(function(){
				$('#whatwedo').cycle(2);
				return false;
						 
						 });

$('#hrprof').click(function(){
				$('#whatwedo').cycle(3);
				return false;
						 
						 });

$('#rec').click(function(){
				$('#whatwedo').cycle(4);
				return false;
						 
						 });


$('#edc').click(function(){
				$('#whatwedo').cycle(5);
				return false;
						 
						 });


$('#psy').click(function(){
				$('#whatwedo').cycle(6);
				return false;
						 
						 });	

$('#hrhuba').click(function(){
				$('#whatwedo').cycle(7);
				return false;
						 
						 });	

$('#icsa').click(function(){
				$('#whatwedo').cycle(8);
				return false;
						 
						 });	

$('#metaa').click(function(){
				$('#whatwedo').cycle(9);
				return false;
						 
						 });	

$('#faq1link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq1").offset().top
	 }, 1000);				  
						  
						  });

$('#faq2link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq2").offset().top
	 }, 1000);				  
						  
						  });

$('#faq3link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq3").offset().top
	 }, 1000);				  
						  
						  });

$('#faq4link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq4").offset().top
	 }, 1000);				  
						  
						  });

$('#faq5link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq5").offset().top
	 }, 1000);				  
						  
						  });

$('#faq6link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq6").offset().top
	 }, 1000);				  
						  
						  });

$('#faq7link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq7").offset().top
	 }, 1000);				  
						  
						  });

$('#faq8link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq8").offset().top
	 }, 1000);				  
						  
						  });

$('#faq9link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq9").offset().top
	 }, 1000);				  
						  
						  });

$('#faq10link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq10").offset().top
	 }, 1000);				  
						  
						  });

$('#faq11link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq11").offset().top
	 }, 1000);				  
						  
						  });

$('#faq12link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq12").offset().top
	 }, 1000);				  
						  
						  });

$('#faq13link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq13").offset().top
	 }, 1000);				  
						  
						  });

$('#faq14link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq14").offset().top
	 }, 1000);				  
						  
						  });

$('#faq15link').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#faq15").offset().top
	 }, 1000);				  
						  
						  });


$('.backtotop').click(function(){
						  
	$('html:not(:animated), body:not(:animated)').animate({
	 scrollTop: $("#navcontainer").offset().top
	 }, 1000);				  
						  
						  });


$('#demobtna').click(function(){
						  
	window.open("http://demo.mindmill.co.uk/relocate_demo.php");			  
						  
						  });
						  


$("#wwdanchor").mouseover(function() { //When trigger is clicked...  

//Following events are applied to the subnav itself (moving subnav up and down)  
 $(this).parent().find("ul#subnavt").slideDown('fast').show(); //Drop down the subnav on click  

$(this).parent().hover(function() {  
}, function(){  
 //$(this).parent().find("ul#subnavt").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
 });  
//Following events are applied to the trigger (Hover events for the trigger)  
 }).hover(function() {  
$(this).addClass("subhover"); //On hover over, add class "subhover"  
}, function(){  //On Hover Out  
 $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
});  
				  

$("#homeanchor").mouseover(function() { 	
	
$("ul#subnavt").slideUp('slow');	
									});

$("#wwaanchor").mouseover(function() { 	
	
$("ul#subnavt").slideUp('slow');	
									});	
									
$("#wuanchor").mouseover(function() { 	
	
$("ul#subnavt").slideUp('slow');	
									});	
									
$("#banchor").mouseover(function() { 	
	
$("ul#subnavt").slideUp('slow');	
									});	
									
$("#danchor").mouseover(function() { 	
	
$("ul#subnavt").slideUp('slow');	
									});		
									
$("#canchor").mouseover(function() { 	
	
$("ul#subnavt").slideUp('slow');	
									});																																								
									  
						   });
