jQuery(function($){

  $('#slide-contact form').submit(function(){
    
    var el = $('#slide-contact button').html('Sending...').prop('disabled',true);
    
    $.ajax({
      url:'/scripts/send.ashx',
      type:'POST',
      dataType:'json',
      data:$(this).serialize(),
      error: function(a){
        alert('Unable to send. Please try again later');
      },
      complete: function(r,d){
        el.html('Send').prop('disabled',false);
      }
    });
    
    return false;
  });
  
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-25027262-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
  $('#os-select-mac').click(function(){
	$.get('/support-includes/email-support-apple.htm', function(data){
		$('#content').html(data);
	});
  });
  $('#os-select-pc').click(function(){
	$.get('/support-includes/email-support-pc.htm', function(data){
		$('#content').html(data);
	});
  });
  $('#os-select-outlook').click(function(){
	$.get('/support-includes/email-support-outlook.htm', function(data){
		$('#content').html(data);
	});
  });


});

