document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <script type=\'text/javascript\'>
  2. /*<![CDATA[*/
  3. (function(e) {
  4.     $.fn.MBLnewsticker = function(e) {
  5.         var t = {
  6.             width: "100%",
  7.             modulid: "MBLnewsticker",
  8.             autoplay: true,
  9.             timer: 3e3,
  10.             itemheight: 130,
  11.             infobarvisible: true,
  12.             btnfacebook: true,
  13.             btntwitter: true,
  14.             btngoogleplus: true,
  15.             btnlinkbutton: true,
  16.             btnlinktarget: "_blank",
  17.             pagecountvisible: true,
  18.             buttonstyle: "black",
  19.             pagenavi: true,
  20.             pagenavistyle: "black",
  21.             feed: false,
  22.             feedcount: 100
  23.         };
  24.  
  25.         var e = $.extend(t, e);
  26.         return this.each(function() {
  27.             function o() {
  28.                 function o() {
  29.                     $(e.modulid + ">div").css({
  30.                         left: ($(e.modulid).width() - 30) / 2
  31.                     })
  32.                 }
  33.                 function u() {
  34.                     $(e.modulid + " ul li").eq(r[0]).addClass("MBL-top0");
  35.                     $(e.modulid + " ul li").eq(r[1]).addClass("MBL-top1");
  36.                     $(e.modulid + " ul li").eq(r[2]).addClass("MBL-top2");
  37.                     $(e.modulid + " ul li").eq(r[3]).addClass("MBL-active");
  38.                     $(e.modulid + " ul li").eq(r[4]).addClass("MBL-bottom2");
  39.                     $(e.modulid + " ul li").eq(r[5]).addClass("MBL-bottom1");
  40.                     $(e.modulid + " ul li").eq(r[6]).addClass("MBL-bottom0")
  41.                 }
  42.                 function a() {
  43.                     t--;
  44.                     if (t < 0) t = n;
  45.                     l()
  46.                 }
  47.                 function f() {
  48.                     t++;
  49.                     if (t == n + 1) t = 0;
  50.                     l()
  51.                 }
  52.                 function l() {
  53.                     $(e.modulid + " ul li").attr("class", "");
  54.                     if (t == 0) {
  55.                         r[0] = n - 2;
  56.                         r[1] = n - 1;
  57.                         r[2] = n;
  58.                         r[3] = t;
  59.                         r[4] = t + 1;
  60.                         r[5] = t + 2;
  61.                         r[6] = t + 3
  62.                     } else if (t == 1) {
  63.                         r[0] = n - 1;
  64.                         r[1] = n;
  65.                         r[2] = t - 1;
  66.                         r[3] = t;
  67.                         r[4] = t + 1;
  68.                         r[5] = t + 2;
  69.                         r[6] = t + 3
  70.                     } else if (t == 2) {
  71.                         r[0] = n;
  72.                         r[1] = t - 2;
  73.                         r[2] = t - 1;
  74.                         r[3] = t;
  75.                         r[4] = t + 1;
  76.                         r[5] = t + 2;
  77.                         r[6] = t + 3
  78.                     } else if (t == n) {
  79.                         r[0] = n - 3;
  80.                         r[1] = n - 2;
  81.                         r[2] = n - 1;
  82.                         r[3] = t;
  83.                         r[4] = 0;
  84.                         r[5] = 1;
  85.                         r[6] = 2
  86.                     } else if (t == n - 1) {
  87.                         r[0] = n - 4;
  88.                         r[1] = n - 3;
  89.                         r[2] = n - 2;
  90.                         r[3] = t;
  91.                         r[4] = t + 1;
  92.                         r[5] = 0;
  93.                         r[6] = 1
  94.                     } else if (t == n - 2) {
  95.                         r[0] = n - 5;
  96.                         r[1] = n - 4;
  97.                         r[2] = n - 3;
  98.                         r[3] = t;
  99.                         r[4] = t + 1;
  100.                         r[5] = t + 2;
  101.                         r[6] = 0
  102.                     } else {
  103.                         r[0] = t - 3;
  104.                         r[1] = t - 2;
  105.                         r[2] = t - 1;
  106.                         r[3] = t;
  107.                         r[4] = t + 1;
  108.                         r[5] = t + 2;
  109.                         r[6] = t + 3
  110.                     }
  111.                     u()
  112.                 }
  113.                 $(e.modulid + " ul li").css({
  114.                     height: e.itemheight,
  115.                     background: e.itembgcolor,
  116.                     border: "solid 1px " + e.bordercolor,
  117.                     color: e.titlecolor,
  118.                     "font-size": e.titlefontsize
  119.                 });
  120.                 $(e.modulid + " ul li").each(function(t, r) {
  121.                     if (e.infobarvisible) {
  122.                         i = \'<div class="MBL-info" style="background:\' + e.infobgcolor + "; border-color:" + e.bordercolor + \';">\';
  123.                         if (e.btnfacebook) i = i + \'<a data-type="facebook" data-url="\' + $(this).find(".MBL-content").attr("data-link") + \'" data-text="\' + $(this).find(".MBL-content").text() + \'" class="MBL-easing2 MBL-facebook-\' + e.buttonstyle + \'"></a>\';
  124.                         if (e.btntwitter) i = i + \'<a data-type="twitter" data-url="\' + $(this).find(".MBL-content").attr("data-link") + \'" data-text="\' + $(this).find(".MBL-content").text() + \'" class="MBL-easing2 MBL-twitter-\' + e.buttonstyle + \'"></a>\';
  125.                         if (e.btngoogleplus) i = i + \'<a data-type="google" data-url="\' + $(this).find(".MBL-content").attr("data-link") + \'" data-text="\' + $(this).find(".MBL-content").text() + \'" class="MBL-easing2 MBL-google-\' + e.buttonstyle + \'"></a>\';
  126.                         if (e.pagecountvisible) i = i + "<span>" + ($(this).index() + 1) + " / " + (n + 1) + "</span>";
  127.                         if (e.btnlinkbutton) i = i + \'<a href="\' + $(this).find(".MBL-content").attr("data-link") + \'" class="MBL-easing2 MBL-link-\' + e.buttonstyle + \'" target="\' + e.btnlinktarget + \'"></a>\';
  128.                         i = i + "</div>"
  129.                     }
  130.                     $(this).append(i)
  131.                 });
  132.                 $(e.modulid + " ul li .MBL-content").find("a").css({
  133.                     color: e.contentlinkcolor
  134.                 });
  135.                 $(e.modulid + " ul li").find(".MBL-info").find("a").click(function(e) {
  136.                     if ($(this).attr("data-type") == "facebook") {
  137.                         window.open("http://www.facebook.com/sharer.php?u=" + encodeURIComponent($(this).attr("data-url")) + "&t=" + encodeURIComponent($(this).attr("data-text")), "sharer", "toolbar=0,status=0,width=626,height=436");
  138.                         return false
  139.                     } else if ($(this).attr("data-type") == "twitter") {
  140.                         window.open("http://twitter.com/share?text=" + $(this).attr("data-text") + "&url=" + $(this).attr("data-url"), "sharer", "toolbar=0,status=0,width=626,height=436");
  141.                         return false
  142.                     } else if ($(this).attr("data-type") == "google") {
  143.                         window.open("https://plus.google.com/share?url=" + $(this).attr("data-url") + "&title=" + $(this).attr("data-text"), "sharer", "height=550,width=525,left=100,top=100,menubar=0");
  144.                         return false
  145.                     }
  146.                 });
  147.                 $(e.modulid + " ul li").click(function(e) {
  148.                     t = $(this).index();
  149.                     l()
  150.                 });
  151.                 if (e.pagenavi) {
  152.                     $(e.modulid).append(\'<div class="MBL-top-arrow"></div><div class="MBL-bottom-arrow"></div>\');
  153.                     $(e.modulid).css({
  154.                         height: e.itemheight + 200,
  155.                         padding: "20px 10px",
  156.                         width: e.width
  157.                     })
  158.                 } else {
  159.                     $(e.modulid).css({
  160.                         height: e.itemheight + 160,
  161.                         padding: "0px 10px",
  162.                         width: e.width
  163.                     })
  164.                 }
  165.                 o();
  166.                 $(window).resize(function(e) {
  167.                     o()
  168.                 });
  169.                 u();
  170.                 $(e.modulid + ">div").click(function(e) {
  171.                     if ($(this).attr("class") == "MBL-top-arrow") a();
  172.                     else f()
  173.                 });
  174.                 if (e.autoplay) {
  175.                     s = setInterval(function() {
  176.                         f()
  177.                     }, e.timer);
  178.                     $(e.modulid).hover(function() {
  179.                         clearInterval(s)
  180.                     }, function() {
  181.                         s = setInterval(function() {
  182.                             f()
  183.                         }, e.timer)
  184.                     })
  185.                 }
  186.             }
  187.             function u() {
  188.                 $.ajax({
  189.                     type: "GET",
  190.                     url: document.location.protocol + "//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=" + e.feedcount + "&callback=?&q=" + encodeURIComponent(e.feed),
  191.                     dataType: "json",
  192.                     async: false,
  193.                     success: function(i) {
  194.                         veri = i.responseData.feed.entries;
  195.                         news = "";
  196.                         $(veri).each(function(e, t) {
  197.                             if (e == 0) news = news + \'<li class="MBL-active"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  198.                             else if (e == 1) news = news + \'<li class="MBL-bottom2"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  199.                             else if (e == 2) news = news + \'<li class="MBL-bottom1"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  200.                             else if (e == 3) news = news + \'<li class="MBL-bottom0"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  201.                             else if (e == veri.length - 1) news = news + \'<li class="MBL-top2"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  202.                             else if (e == veri.length - 2) news = news + \'<li class="MBL-top1"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  203.                             else if (e == veri.length - 3) news = news + \'<li class="MBL-top0"><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>";
  204.                             else news = news + \'<li><div class="MBL-content" data-link="\' + veri[e].link + \'"><a href="\' + veri[e].link + \'">\' + veri[e].title + "</a></div></li>"
  205.                         });
  206.                         $(e.modulid + " ul").html("");
  207.                         $(e.modulid + " ul").append(news);
  208.                         n = veri.length - 1;
  209.                         r = [n - 2, n - 1, n, t, t + 1, t + 2, t + 3];
  210.                         o()
  211.                     },
  212.                     error: function() {
  213.                         $(e.modulid + " ul").html(\'<li class="MBL-active"><div class="MBL-content">Error! Please try again later...</div></li>\')
  214.                     }
  215.                 })
  216.             }
  217.             e.modulid = "#" + $(this).attr("id");
  218.             var t = 0;
  219.             var n = $(e.modulid + " ul li").length - 1;
  220.             var r = [n - 2, n - 1, n, t, t + 1, t + 2, t + 3];
  221.             var i = "";
  222.             var s = e.modulid;
  223.             if (e.feed != false) {
  224.                 $(e.modulid + " ul").html("");
  225.                 $(e.modulid + " ul").append(\'<li class="MBL-active"><div class="MBL-content">Rss Feed Loading...</div></li>\');
  226.                 u()
  227.             } else {
  228.                 o()
  229.             }
  230.         })
  231.     }
  232. })(jQuery)
  233. /*]]>*/
  234. </script>
');