﻿/*global $ Modernizr*/
$(function() {
  /* test if host os is mac */
  //To use: if (Modernizr.mac) {}
  Modernizr.addTest('mac', function () {
    return !navigator.appVersion.indexOf('Mac' !== -1);
  });
  
  /* test if host iphone/ipod */
  //To use: if (Modernizr.iphone) {}
  Modernizr.addTest('iphone', function () {
    return (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i));
  });
  
  /* test if ipad */
  //To use: if (Modernizr.ipad) {}
  Modernizr.addTest('ipad', function () {
    return (navigator.userAgent.match(/iPad/i));
  });
  
  /* test if android or handheld with touch */
  //TODO: write
  //Modernizr.addTest('handheldwithtouch', function () {
  //  return !navigator.appVersion.indexOf('Mac' != -1);
  //});
  
  
});

  


