<!DOCTYPE html>
<html class='no-js' dir='ltr' lang='en'>
<head>
<meta charset='utf-8'>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=5' name='viewport'>
<title>TAPinto</title>
<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-ec33319a938e1fd16505424c4c26b30688b7d6498833f1f9bf004fe7ff291176.ico" />
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1883897348500567',
xfbml : true,
version : 'v2.9'
});
FB.AppEvents.logPageView();
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'))
</script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<script src="//imasdk.googleapis.com/js/sdkloader/ima3.js" async></script>
<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js" async></script>
<script src="https://www.google.com/recaptcha/api.js?render=6LfXe74ZAAAAAHJBK2_g20veCbjMOmv54wNOLE_i"></script>
<meta name="description" content="TAPinto is a network of online local news and digital marketing platforms for communities in FL, NJ, NY and PA." />
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5656205-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);
})();
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-T6GGB6V');</script>
<!-- End Google Tag Manager -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '904299443083000');
</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=904299443083000&ev=PageView&noscript=1"/></noscript>
<script>
fbq('track', 'PageView');
</script>
<script>
(function() {
window._pa = window._pa || {};
// _pa.orderId = "myOrderId"; // OPTIONAL: attach unique conversion identifier to conversions
// _pa.revenue = "19.99"; // OPTIONAL: attach dynamic purchase values to conversions
// _pa.productId = "myProductId"; // OPTIONAL: Include product ID for use with dynamic ads
var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
pa.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + "//tag.marinsm.com/serve/5b58b4bf6f4e021abd0000b8.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pa, s);
})();
</script>
<link rel="stylesheet" media="screen" href="/assets/application-60ca58c378124f29343ed12ff12b4d808cd9650353fd97747672a1fef2960783.css" />
<link rel="stylesheet" media="print" href="/assets/print-8326726ca213bace3745d8d4efbdaa7e288c712db4b660d6fd6b02cdd7c1a930.css" />
<script src="/packs/js/overallHomepage-1b890e04721f23930bfa.js"></script>
</head>
<body class='index production' id='towns'>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T6GGB6V"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id='overall-header-container'>
<div id="Masterhead-react-component-e2b8e3d1-2beb-4aa5-a855-31462d539bc3"></div>
<script type="application/json" class="js-react-on-rails-component" data-component-name="Masterhead" data-dom-id="Masterhead-react-component-e2b8e3d1-2beb-4aa5-a855-31462d539bc3">{"is_article_preview":false,"is_path_user_sign_in":false,"is_iframe":false,"town_slug":null,"section":null,"overall_page":true,"current_user":null,"display_weather":null,"is_weather_clickable":null,"sponsor_info":null,"show_thankyou_message":false,"show_permission_form":false}</script>
</div>
<div class='mobile_no_margin'>
<script type="application/json" id="js-react-on-rails-context">{"railsEnv":"production","inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","rorVersion":"11.3.1","rorPro":false,"href":"http://tapinto.net/","location":"/","scheme":"http","host":"tapinto.net","port":null,"pathname":"/","search":null,"httpAcceptLanguage":null,"serverSide":false}</script>
<div id="OverallHomepage-react-component-feb2f320-db15-44f3-8821-69768ea46d9a"></div>
<script type="application/json" class="js-react-on-rails-component" data-component-name="OverallHomepage" data-dom-id="OverallHomepage-react-component-feb2f320-db15-44f3-8821-69768ea46d9a">{}</script>
</div>
<div id="Footer-react-component-43d7817d-a19b-4bc3-a37f-034039b6214d"></div>
<script type="application/json" class="js-react-on-rails-component" data-component-name="Footer" data-dom-id="Footer-react-component-43d7817d-a19b-4bc3-a37f-034039b6214d">{}</script>
<script type="text/javascript">
(function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};e[e.visitorGlobalObjectAlias].l=(new Date).getTime();r=t.createElement("script");r.src=o;r.async=true;i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo");
vgo('setAccount', '90850284');
vgo('setTrackByDefault', true);
vgo('process');
</script>
<script>
// Copyright 2013 Google Inc. All Rights Reserved.
// You may study, modify, and use this example for any purpose.
// Note that this example is provided "as is", WITHOUT WARRANTY
// of any kind either expressed or implied.
var town_name = "homepage";
var adsManager;
var adsLoader;
var adDisplayContainer;
var intervalTimer;
var playButton;
var videoContent;
var poster;
var dfp_config_id = "26641674"
function init() {
videoContent = document.getElementById('contentElement');
playButton = document.getElementById('playButton');
if (playButton){
playButton.addEventListener('click', playAds);
}
setUpIMA();
}
function setUpIMA() {
// Create the ad display container.
createAdDisplayContainer();
// Create ads loader.
adsLoader = new google.ima.AdsLoader(adDisplayContainer);
// Listen and respond to ads loaded and error events.
adsLoader.addEventListener(
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
onAdsManagerLoaded,
false);
adsLoader.addEventListener(
google.ima.AdErrorEvent.Type.AD_ERROR,
onAdError,
false);
// An event listener to tell the SDK that our content video
// is completed so the SDK can play any post-roll ads.
var contentEndedListener = function() {adsLoader.contentComplete();};
videoContent.onended = contentEndedListener;
var tag_url = 'https://pubads.g.doubleclick.net/gampad/ads?sz=300x250&iu=/' + dfp_config_id + '/video-ad-unit&cust_params=town%3D' + town_name + '&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]'
// Request video ads.
var adsRequest = new google.ima.AdsRequest();
adsRequest.adTagUrl = tag_url;
// Specify the linear and nonlinear slot sizes. This helps the SDK to
// select the correct creative if multiple are returned.
adsRequest.linearAdSlotWidth = 300;
adsRequest.linearAdSlotHeight = 250;
adsRequest.nonLinearAdSlotWidth = 300;
adsRequest.nonLinearAdSlotHeight = 250;
adsLoader.requestAds(adsRequest);
}
function createAdDisplayContainer() {
// We assume the adContainer is the DOM id of the element that will house
// the ads.
adDisplayContainer = new google.ima.AdDisplayContainer(
document.getElementById('adContainer'), videoContent);
}
function playAds() {
// Initialize the container. Must be done via a user action on mobile devices.
videoContent.load();
adDisplayContainer.initialize();
try {
// Initialize the ads manager. Ad rules playlist will start at this time.
adsManager.init(300, 250, google.ima.ViewMode.NORMAL);
// Call play to start showing the ad. Single video and overlay ads will
// start at this time; the call will be ignored for ad rules.
adsManager.start();
document.getElementById('playButton').style.display = 'none';
poster = $("#contentElement").attr("poster");
} catch (adError) {
// An error may be thrown if there was a problem with the VAST response.
videoContent.play();
}
}
function onAdsManagerLoaded(adsManagerLoadedEvent) {
// Get the ads manager.
var adsRenderingSettings = new google.ima.AdsRenderingSettings();
adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;
// videoContent should be set to the content video element.
adsManager = adsManagerLoadedEvent.getAdsManager(
videoContent, adsRenderingSettings);
// Add listeners to the required events.
adsManager.addEventListener(
google.ima.AdErrorEvent.Type.AD_ERROR,
onAdError);
adsManager.addEventListener(
google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,
onContentPauseRequested);
adsManager.addEventListener(
google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,
onContentResumeRequested);
adsManager.addEventListener(
google.ima.AdEvent.Type.ALL_ADS_COMPLETED,
onAdEvent);
// Listen to any additional events, if necessary.
adsManager.addEventListener(
google.ima.AdEvent.Type.LOADED,
onAdEvent);
adsManager.addEventListener(
google.ima.AdEvent.Type.STARTED,
onAdEvent);
adsManager.addEventListener(
google.ima.AdEvent.Type.COMPLETE,
onAdEvent);
adsManager.addEventListener(
google.ima.AdEvent.Type.CLICK,
onAdEvent);
}
function onAdEvent(adEvent) {
// Retrieve the ad from the event. Some events (e.g. ALL_ADS_COMPLETED)
// don't have ad object associated.
var ad = adEvent.getAd();
switch (adEvent.type) {
case google.ima.AdEvent.Type.LOADED:
// This is the first event sent for an ad - it is possible to
// determine whether the ad is a video ad or an overlay.
if (!ad.isLinear()) {
// Position AdDisplayContainer correctly for overlay.
// Use ad.width and ad.height.
videoContent.play();
}
break;
case google.ima.AdEvent.Type.STARTED:
// This event indicates the ad has started - the video player
// can adjust the UI, for example display a pause button and
// remaining time.
if (ad.isLinear()) {
// For a linear ad, a timer can be started to poll for
// the remaining time.
intervalTimer = setInterval(
function() {
var remainingTime = adsManager.getRemainingTime();
},
300); // every 300ms
}
break;
case google.ima.AdEvent.Type.COMPLETE:
// This event indicates the ad has finished - the video player
// can perform appropriate UI actions, such as removing the timer for
// remaining time detection.
$("#adContainer").hide();
if (ad.isLinear()) {
clearInterval(intervalTimer);
}
break;
case google.ima.AdEvent.Type.CLICK:
if (ad.isLinear()) {
adsManager.pause();
document.getElementById('playButton').style.display = 'initial';
$("#contentElement").attr("poster", poster);
}
break;
}
}
function onAdError(adErrorEvent) {
// Handle the error logging.
console.log(adErrorEvent.getError());
adsManager.destroy();
}
function onContentPauseRequested() {
videoContent.pause();
// This function is where you should setup UI for showing ads (e.g.
// display ad timer countdown, disable seeking etc.)
// setupUIForAds();
}
function onContentResumeRequested() {
videoContent.play();
// This function is where you should ensure that your UI is ready
// to play content. It is the responsibility of the Publisher to
// implement this function when necessary.
// setupUIForContent();
}
// Wire UI element references and UI event listeners.
//Synchronically load video ad with react elements.
setTimeout(function () {
console.log("start rendering mobile video ad")
init();
}, 4000);
</script>
</body>
</html>