if (typeof jQuery == 'function') { $(document).ready(function() { var deviceDetector=function(){var b=navigator.userAgent.toLowerCase(),a=function(a){void 0!==a&&(b=a.toLowerCase());return/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(b)?"tablet":/(mobi|ipod|phone|blackberry|opera mini|fennec|minimo|symbian|psp|nintendo ds|archos|skyfire|puffin|blazer|bolt|gobrowser|iris|maemo|semc|teashark|uzard)/.test(b)?"phone":"desktop"};return{device:a(),detect:a,isMobile:"desktop"!=a()?!0:!1,userAgent:b}}(); function __store_device_detection(fingerprint,components) { var fingerprint = typeof fingerprint != 'undefined' ? fingerprint : ''; var components = typeof components != 'undefined' ? components : []; $.post('https://www.simulnews.com/device/detect', { fingerprint: fingerprint, components: components, width: screen.width, height: screen.height, type: deviceDetector.device }, function(response) { $('body').trigger('device.detected', [response]); console.log('device detection data ' + JSON.stringify(response)); }, 'json'); }; try {  new Fingerprint2().get(function(result, components) { __store_device_detection(result,components); }); } catch (e) { __store_device_detection(false); } }); }