function getCookie2(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } } return unescape(dc.substring(begin + prefix.length, end)); } var days = 15; var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); var cky = 'cookie3=app' + expires + '; path=/'; var app_banner = ""; var banner_cookie = getCookie2("cookie3"); if (banner_cookie == null) { app_banner = 1; } else{ app_banner = 2; } var cky2 = 'cookie4=app' + expires + '; path=/'; var app_banner2 = ""; var banner_cookie2 = getCookie2("cookie4"); if (banner_cookie2 == null) { app_banner2 = 1; } else{ app_banner2 = 2; } var isiPad = navigator.userAgent.match(/iPad/i) != null; var isiPhone = navigator.userAgent.match(/iPhone/i) != null; var isAndroid = navigator.userAgent.match(/Android/i) != null; var isWindows = navigator.userAgent.match(/Windows Phone/i) != null; if(isiPhone && app_banner == 1){ $("
 X
Get More With Our App
You can now experience social video bookmarking and sharing in the palm of your hand!
InstallOpen
").insertBefore( '#myv_header' );}else if (isAndroid && app_banner == 1 && !isWindows){$("
 X
Get More With Our App
You can now experience social video bookmarking and sharing in the palm of your hand!
InstallOpen
").insertBefore( '#myv_header' ); } else if(isiPad || isWindows && app_banner == 1){ $("
 X
Get More With Our App
You can now experience social video bookmarking and sharing in the palm of your hand!
Install
").insertBefore( "#myv_header" ); } $( "#close-banner" ).click(function() { $( "#app" ).fadeOut( "slow" ); document.cookie = cky; }); $( "#close-banner2" ).click(function() { $( "#app2" ).fadeOut( "slow" ); document.cookie = cky2; });