var featureScroll = null; $(document).ready(function() { initSite(); }); function initSite() { $(".subHeading").after("
"); $(".headlineWrap").prepend("

Quick Shot:

"); $(".schFeedWrap .feedDesc1").after(""); //$(".pointsFeedWrap .emptyFeed").replaceWith('
ASCS National Sprint Carsas of 4/6/2013
Full Points
ASCS National Sprint Carsas of 4/6/2013
Full Points
ASCS National Sprint Carsas of 4/6/2013
Full Points
'); //$(".resultsFeedWrap .emptyFeed").replaceWith('
I-30 Speedway4/6/2013ASCS Sprints
Full Results
I-30 Speedway4/6/2013ASCS Sprints
Full Results
'); //if ($("div.resultsFeed .feedContent").length > 1) { // $("div.resultsFeed .feedContent").wrapAll("
"); // $(".resultsScrollable").before(""); // $("div.resultsFeedSub").scrollable({ clickable: false, loop: false, size: 1, keyboard: false, next: ".resultsNext", prev: ".resultsPrev", items: "div.resultsScrollable" }); //} //if ($("div.pointsFeed .feedContent").length > 1) { // $("div.pointsFeed .feedContent").wrapAll("
"); // $(".pointsScrollable").before(""); // $("div.pointsFeedSub").scrollable({ clickable: false, loop: false, size: 1, keyboard: false, next: ".pointsNext", prev: ".pointsPrev", items: "div.pointsScrollable" }); //} if ($(".headlineItem").length > 1) custScroll(700, 4000, -27, 'top', '.headlineWrap', '.headlineList', 'headlineItem'); initFeatured(); initSearchComplete(); startSite(); } function stopSite() { if (featureScroll != null) featureScroll.stop(); } function startSite() { //current scrollabe requires scrollables to be "played()" before they can be stopped....lame var t1 = 4500; var t2 = 7500; var t3 = 5500; if (featureScroll != null) { setTimeout("featureScroll.play();", t2); } if ($("#sponsorWrapper .singleAdWrap").length > 3) { $("#sponsorWrapper .adWrap").css('width', '3000em').css('text-align', 'left'); custScroll(1200, 4000, -170, 'left', '#sponsorWrapper', '.adWrap', 'singleAdWrap'); } if ($(".addAddThisToThisWrapper").length > 0) { var addthis_config = { "data_track_clickback": true } var mrp_addThis = '
' + '' + '' + '' + '
'; //$(".mrp_singleNewsHead h3").after(mrp_addThis); $(".addAddThisToThis").append(mrp_addThis); addJavascript('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4dc0143410139c8e', 'head'); $(".addAddThisToThisWrapper").show(); } } function initFeatured() { var featureScroll = null; if (!$(".featureFeedSub").is(":empty")) { if ($("div.featureFeed .featureFeedContent").length > 1) { featureScroll = $(".featureFeed").scrollable({ clickable: false, loop: true, size: 1, keyboard: false, speed: 1000, items: ".featureFeedSub", circular: true }).navigator(".featureThumbsWrap").autoscroll({ autoplay: false, interval: 7500, api: true }); $(".featureThumb:first").addClass("active"); if (featureScroll != null) { featureScroll.play(); } } } } function initSearchComplete() { $(".mrp_input1 input[type='text']").autocomplete("/ui/autocomplete.aspx?ref=d-t", { scrollHeight: 200, width: 230, addTop: 9, addLeft: -12, delay: 100, max: 30, selectFirst: false, formatResult: function(item) { return item[0].replace(/(<.+?>)/gi, ''); } }).result(function(event, item) { location.href = item.attr("href"); }); }