/* * JS Redirection Mobile * From: https://github.com/sebarmeli/JS-Redirection-Mobile-Site * Developed by * Sebastiano Armeli-Battana (@sebarmeli) - http://www.sebastianoarmelibattana.com * Dual licensed under the MIT or GPL Version 3 licenses. * @version 0.8.6 */ if(!window.SA){window.SA={};}SA.redirection_mobile=function(j){var c=function(t){var s=new Date();s.setTime(s.getTime()+t);return s;};var m=function(x){if(!x){return;}var s=document.location.search,y=s&&s.substring(1).split("&"),u=0,w=y.length;for(;u=0||f===o){if(window.sessionStorage){window.sessionStorage.setItem(n,o);}else{document.cookie=n+"="+o+";expires="+c(3600*1000*h).toUTCString();}}var q=(window.sessionStorage)?(window.sessionStorage.getItem(n)===o):false,i=document.cookie?(document.cookie.indexOf(n)>=0):false;if(!!(a.match(/(iPad|SCH-I800|xoom|kindle)/i))){b=(r.tablet_redirection===e)?true:false;}if(b&&!(i||q)){if(r.beforeredirection_callback){if(!r.beforeredirection_callback.call(this)){return;}}document.location.href=d+"//"+g;}};