$(document).ready(function() {
  
  var img_dir = "http://dev.managedpro.com/wp-content/themes/default/images/";
  // **** NAV MENU ****
  
  $(".nav .security").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'button/security_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".performance").attr('src', img_dir+'button/performance.png');
    $(".performance").attr('onMouseOver', 'changeImg("performance",performance_img2)');
    $(".performance").attr('onMouseOut', 'changeImg("performance",performance_img)');
    $(".compliance").attr('src', img_dir+'button/compliance.png');
    $(".compliance").attr('onMouseOver', 'changeImg("compliance",compliance_img2)');
    $(".compliance").attr('onMouseOut', 'changeImg("compliance",compliance_img)');
    $(".security_content").css('display', 'block');
    $(".performance_content").css('display', 'none');
    $(".compliance_content").css('display', 'none');   
  });
  $(".nav .performance").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'button/performance_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".security").attr('src', img_dir+'button/security.png');
    $(".security").attr('onMouseOver', 'changeImg("security",security_img2)');
    $(".security").attr('onMouseOut', 'changeImg("security",security_img)');
    $(".compliance").attr('src', img_dir+'button/compliance.png');
    $(".compliance").attr('onMouseOver', 'changeImg("compliance",compliance_img2)');
    $(".compliance").attr('onMouseOut', 'changeImg("compliance",compliance_img)');
    $(".performance_content").css('display', 'block');
    $(".security_content").css('display', 'none');
    $(".compliance_content").css('display', 'none');  
  });
  $(".nav .compliance").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'button/compliance_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".security").attr('src', img_dir+'button/security.png');
    $(".security").attr('onMouseOver', 'changeImg("security",security_img2)');
    $(".security").attr('onMouseOut', 'changeImg("security",security_img)');
    $(".performance").attr('src', img_dir+'button/performance.png');
    $(".performance").attr('onMouseOver', 'changeImg("performance",performance_img2)');
    $(".performance").attr('onMouseOut', 'changeImg("performance",performance_img)');
    $(".compliance_content").css('display', 'block');
    $(".performance_content").css('display', 'none');
    $(".security_content").css('display', 'none');  
  });
  
  $(".nav001").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'products_services/nav001_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".product_banner").attr('src', img_dir+'banner/email_security.jpg');
    $(".nav002").attr('src', img_dir+'products_services/nav002.png');
    $(".nav002").attr('onMouseOver', 'changeImg("nav002",nav002_img2)');
    $(".nav002").attr('onMouseOut', 'changeImg("nav002",nav002_img)');
    $(".nav003").attr('src', img_dir+'products_services/nav003.png');
    $(".nav003").attr('onMouseOver', 'changeImg("nav003",nav003_img2)');
    $(".nav003").attr('onMouseOut', 'changeImg("nav003",nav003_img)');
    $(".nav004").attr('src', img_dir+'products_services/nav004.png');
    $(".nav004").attr('onMouseOver', 'changeImg("nav004",nav004_img2)');
    $(".nav004").attr('onMouseOut', 'changeImg("nav004",nav004_img)');
    $(".nav001_content").css('display', 'block');
    $(".nav002_content").css('display', 'none');
    $(".nav003_content").css('display', 'none');
    $(".nav004_content").css('display', 'none');    
  });
  $(".nav002").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'products_services/nav002_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".product_banner").attr('src', img_dir+'banner/end_point_security.jpg');
    $(".nav001").attr('src', img_dir+'products_services/nav001.png');
    $(".nav001").attr('onMouseOver', 'changeImg("nav001",nav001_img2)');
    $(".nav001").attr('onMouseOut', 'changeImg("nav001",nav001_img)');
    $(".nav003").attr('src', img_dir+'products_services/nav003.png');
    $(".nav003").attr('onMouseOver', 'changeImg("nav003",nav003_img2)');
    $(".nav003").attr('onMouseOut', 'changeImg("nav003",nav003_img)');
    $(".nav004").attr('src', img_dir+'products_services/nav004.png');
    $(".nav004").attr('onMouseOver', 'changeImg("nav004",nav004_img2)');
    $(".nav004").attr('onMouseOut', 'changeImg("nav004",nav004_img)');
    $(".nav002_content").css('display', 'block');
    $(".nav001_content").css('display', 'none');
    $(".nav003_content").css('display', 'none');
    $(".nav004_content").css('display', 'none');    
  });
  $(".nav003").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'products_services/nav003_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".product_banner").attr('src', img_dir+'banner/VOIP.jpg');
    $(".nav001").attr('src', img_dir+'products_services/nav001.png');
    $(".nav001").attr('onMouseOver', 'changeImg("nav001",nav001_img2)');
    $(".nav001").attr('onMouseOut', 'changeImg("nav001",nav001_img)');
    $(".nav002").attr('src', img_dir+'products_services/nav002.png');
    $(".nav002").attr('onMouseOver', 'changeImg("nav002",nav002_img2)');
    $(".nav002").attr('onMouseOut', 'changeImg("nav002",nav002_img)');
    $(".nav004").attr('src', img_dir+'products_services/nav004.png');
    $(".nav004").attr('onMouseOver', 'changeImg("nav004",nav004_img2)');
    $(".nav004").attr('onMouseOut', 'changeImg("nav004",nav004_img)');
    $(".nav003_content").css('display', 'block');
    $(".nav001_content").css('display', 'none');
    $(".nav002_content").css('display', 'none');
    $(".nav004_content").css('display', 'none');    
  });
  $(".nav004").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'products_services/nav004_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".product_banner").attr('src', img_dir+'banner/secure_remote_backup.jpg');
    $(".nav001").attr('src', img_dir+'products_services/nav001.png');
    $(".nav001").attr('onMouseOver', 'changeImg("nav001",nav001_img2)');
    $(".nav001").attr('onMouseOut', 'changeImg("nav001",nav001_img)');
    $(".nav002").attr('src', img_dir+'products_services/nav002.png');
    $(".nav002").attr('onMouseOver', 'changeImg("nav002",nav002_img2)');
    $(".nav002").attr('onMouseOut', 'changeImg("nav002",nav002_img)');
    $(".nav003").attr('src', img_dir+'products_services/nav003.png');
    $(".nav003").attr('onMouseOver', 'changeImg("nav003",nav003_img2)');
    $(".nav003").attr('onMouseOut', 'changeImg("nav003",nav003_img)');
    $(".nav004_content").css('display', 'block');
    $(".nav001_content").css('display', 'none');
    $(".nav002_content").css('display', 'none');
    $(".nav003_content").css('display', 'none');    
  });
  $(".ms_nav001").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'managed_services/nav001_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".ms_nav002").attr('src', img_dir+'managed_services/nav002.png');
    $(".ms_nav002").attr('onMouseOver', 'changeImg("ms_nav002",ms_nav002_img2)');
    $(".ms_nav002").attr('onMouseOut', 'changeImg("ms_nav002",ms_nav002_img)');
    $(".ms_nav001_content").css('display', 'block');
    $(".ms_nav002_content").css('display', 'none');  
  });
  $(".ms_nav002").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'managed_services/nav002_enter.png');
    $(this).attr('onMouseOver', '');
    $(this).attr('onMouseOut', '');
    $(".ms_nav001").attr('src', img_dir+'managed_services/nav001.png');
    $(".ms_nav001").attr('onMouseOver', 'changeImg("ms_nav001",ms_nav001_img2)');
    $(".ms_nav001").attr('onMouseOut', 'changeImg("ms_nav001",ms_nav001_img)');
    $(".ms_nav002_content").css('display', 'block');
    $(".ms_nav001_content").css('display', 'none');    
  });
  $(".online_support").click(function(trigger) {         
  	trigger.preventDefault();
    $(this).attr('src', img_dir+'button/online_support_enter.png');
    $(".managed_support_content").hide();
    $(".online_support_content").show();  
  });
  $(".managed_support").click(function(trigger) {         
  	trigger.preventDefault();
    $(".online_support").attr('src', img_dir+'button/online_support.png');
    $(".managed_support_content").show();
    $(".online_support_content").hide();   
  });
  
  $(".nav .products_services").mouseover(function(trigger) {         
		trigger.preventDefault();
    $(this).css('backgroundColor', '#5e5e5e');
    $(this).css('cursor', 'pointer');  
  });
  $(".nav .products_services").mouseout(function(trigger) {         
		trigger.preventDefault();
    $(this).css('backgroundColor', '#353535');
    $(this).css('cursor', 'default');  
  });
  $(".nav .products_services").click(function(trigger) {         
  	window.location = "products-services"; 
  });
  $(".nav .testimony").mouseover(function(trigger) {         
		trigger.preventDefault();
    $(this).css('backgroundColor', '#5e5e5e');
    $(this).css('cursor', 'pointer');  
  });
  $(".nav .testimony").mouseout(function(trigger) {         
		trigger.preventDefault();
    $(this).css('backgroundColor', '#353535');
    $(this).css('cursor', 'default');  
  });
  $(".nav .testimony").click(function(trigger) {         
  	window.location = "testimony";  
  }); 
  $(".nav .managed_services").mouseover(function(trigger) {         
		trigger.preventDefault();
    $(this).css('backgroundColor', '#5e5e5e');
    $(this).css('cursor', 'pointer');  
  });
  $(".nav .managed_services").mouseout(function(trigger) {         
		trigger.preventDefault();
    $(this).css('backgroundColor', '#353535');
    $(this).css('cursor', 'default');  
  });
  $(".nav .managed_services").click(function(trigger) {         
  	window.location = "managed-services";  
  });
  
   
  /*$(".nav .solutions").mouseover(function(trigger) {         
		trigger.preventDefault();
    $(".solutions_popup").show();
    $(this).css('cursor', 'pointer');  
  });
  $(".nav .solutions").mouseout(function(trigger) {         
    $(".solutions_popup").hide();
    $(this).css('cursor', 'default');  
  });
    $(".nav .performance").mouseover(function(trigger) { 
      $(this).css('cursor', 'pointer');
      $(".blue_dot").show();
      $(".blue_dot").css('marginTop', '171px');         
    });
    $(".nav .performance").mouseout(function(trigger) {
      $(".blue_dot").hide();           
    });
    $(".nav .performance").click(function(trigger) {         
  		window.location = "performance";  
    });
    $(".nav .compliance").mouseover(function(trigger) {
      $(this).css('cursor', 'pointer');
      $(".solutions_popup").show();
      $(".blue_dot").show();
      $(".blue_dot").css('marginTop', '188px');            
    });
    $(".nav .compliance").mouseout(function(trigger) {         
  		$(".blue_dot").hide();
    });
    $(".nav .compliance").click(function(trigger) {         
  		window.location = "compliance";  
    }); */
    
  // **** Managed your IT ****
  $(".services").mouseover(function(trigger) {
    $(".managed_your_IT").css('backgroundImage', 'url(http://www.managedpro.com/wp-content/themes/default/images/managed_your_IT_over.png)');           
  });
  $(".services").mouseout(function(trigger) {
    $(".managed_your_IT").css('backgroundImage', 'url(http://www.managedpro.com/wp-content/themes/default/images/managed_your_IT.png)');           
  });
  $(".support").mouseover(function(trigger) {
    $(".managed_your_IT").css('backgroundImage', 'url(http://www.managedpro.com/wp-content/themes/default/images/managed_your_IT_over.png)');           
  });
  $(".support").mouseout(function(trigger) {
    $(".managed_your_IT").css('backgroundImage', 'url(http://www.managedpro.com/wp-content/themes/default/images/managed_your_IT.png)');           
  }); 
});