PageSourceSearch

https://static.moncloa.com/wp-content/plugins/news-ticker-benaceur/style-anim/inc/scripts.js?ver=1.0.2

js moncloa.com collected 2026-10-02 03:17:13 UTC 73,487 bytes, 1,494 lines download raw bytes

1//ellipsis
2if (ntb_anims.ellipsis == true) {!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){"use strict";function Ellipsis(el,opts){function create(){base.text=base.$cont.text(),base.opts.ellipLineClass=base.opts.ellipClass+"-line",base.$el=$('<span class="'+base.opts.ellipClass+'" />'),base.$el.text(base.text),base.$cont.empty().append(base.$el),init()}function init(){return"number"==typeof base.opts.lines&&base.opts.lines<2?void base.$el.addClass(base.opts.ellipLineClass):(contHeight=base.$cont.height(),void("auto"===base.opts.lines&&base.$el.prop("scrollHeight")<=contHeight||setStartEllipAt&&(words=$.trim(escapeText(base.text)).split(/\s+/),base.$el.html(span+words.join("</span> "+span)+"</span>"),base.$el.find("span").each(setStartEllipAt),null!=startEllipAt&&updateText(startEllipAt))))}function updateText(nth){words[nth]='<span class="'+base.opts.ellipLineClass+'">'+words[nth],words.push("</span>"),base.$el.html(words.join(" "))}function escapeText(text){return String(text).replace(/[&<>"'``\/]/g,function(s){return htmlEntities[s]})}var setStartEllipAt,startEllipAt,resizeTimer,currOffset,lineHeight,contHeight,words,htmlEntities,base=this,currLine=0,lines=[];if(htmlEntities={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","/":"&#x2F;","\\":"&#x5C;"},base.$cont=$(el),base.opts=$.extend({},defaults,opts),"auto"===base.opts.lines){var setStartEllipByHeight=function(i,word){var $word=$(word),top=$word.position().top;return lineHeight=lineHeight||$word.height(),top===currOffset?lines[currLine].push($word):(currOffset=top,currLine+=1,lines[currLine]=[$word]),top+lineHeight>contHeight?(startEllipAt=i-lines[currLine-1].length,!1):void 0};setStartEllipAt=setStartEllipByHeight}if("number"==typeof base.opts.lines&&base.opts.lines>1){var setStartEllipByLine=function(i,word){var $word=$(word),top=$word.position().top;return top!==currOffset&&(currOffset=top,currLine+=1),currLine===base.opts.lines?(startEllipAt=i,!1):void 0};setStartEllipAt=setStartEllipByLine}if(base.opts.responsive){var resize=function(){lines=[],currLine=0,currOffset=null,startEllipAt=null,base.$el.html(escapeText(base.text)),clearTimeout(resizeTimer),resizeTimer=setTimeout(init,100)};$(window).on("resize."+namespace,resize)}create()}var namespace="ntb_ellipsis",span='<span style="white-space: nowrap;">',defaults={lines:"auto",ellipClass:"ellip",responsive:!1};$.fn[namespace]=function(opts){return this.each(function(){try{$(this).data(namespace,new Ellipsis(this,opts))}catch(err){window.console&&console.error(namespace+": "+err)}})}});
3
4(function($){
5$('.news-ticker-ntb ul a').ntb_ellipsis({
6  lines: 1,             // force ellipsis after a certain number of lines. Default is 'auto'
7  ellipClass: 'ntb_ellip',  // class used for ellipsis wrapper and to namespace ellip line
8  responsive: true      // set to true if you want ellipsis to update on window resize. Default is false
9});
10})(jQuery);}
11//ellipsis
12
13if ( ntb_anims.is_two == true && ntb_anims.disable_anim == false ) {
14!function($,undefined){"use strict";function debug(s){$.fn.cycle.debug&&log(s)}function log(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function triggerPause(cont,byHover,onPager){var opts=$(cont).data("cycle.opts");if(opts){var paused=!!cont.cyclePause;paused&&opts.paused?opts.paused(cont,opts,byHover,onPager):!paused&&opts.resumed&&opts.resumed(cont,opts,byHover,onPager)}}function handleArguments(cont,options,arg2){function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===!0){var options=$(cont).data("cycle.opts");if(!options)return log("options not found, can not resume"),!1;cont.cycleTimeout&&(clearTimeout(cont.cycleTimeout),cont.cycleTimeout=0),go(options.elements,options,1,!options.backwards)}}if(cont.cycleStop===undefined&&(cont.cycleStop=0),(options===undefined||null===options)&&(options={}),options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");return opts?(cont.cycleStop++,cont.cycleTimeout&&clearTimeout(cont.cycleTimeout),cont.cycleTimeout=0,opts.elements&&$(opts.elements).stop(),$(cont).removeData("cycle.opts"),"destroy"==options&&destroy(cont,opts),!1):!1;case"toggle":return cont.cyclePause=1===cont.cyclePause?0:1,checkInstantResume(cont.cyclePause,arg2,cont),triggerPause(cont),!1;case"pause":return cont.cyclePause=1,triggerPause(cont),!1;case"resume":return cont.cyclePause=0,checkInstantResume(!1,arg2,cont),triggerPause(cont),!1;case"prev":case"next":return(opts=$(cont).data("cycle.opts"))?("string"==typeof arg2&&(opts.oneTimeFx=arg2),$.fn.cycle[options](opts),!1):(log('options not found, "prev/next" ignored'),!1);default:options={fx:options}}return options}if(options.constructor==Number){var num=options;return(options=$(cont).data("cycle.opts"))?0>num||num>=options.elements.length?(log("invalid slide index: "+num),!1):(options.nextSlide=num,cont.cycleTimeout&&(clearTimeout(cont.cycleTimeout),cont.cycleTimeout=0),"string"==typeof arg2&&(options.oneTimeFx=arg2),go(options.elements,options,1,num>=options.currSlide),!1):(log("options not found, can not advance slide"),!1)}return options}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter)try{el.style.removeAttribute("filter")}catch(smother){}}function destroy(cont,opts){opts.next&&$(opts.next).unbind(opts.prevNextEvent),opts.prev&&$(opts.prev).unbind(opts.prevNextEvent),(opts.pager||opts.pagerAnchorBuilder)&&$.each(opts.pagerAnchors||[],function(){this.unbind().remove()}),opts.pagerAnchors=null,$(cont).unbind("mouseenter.cycle mouseleave.cycle"),opts.destroy&&opts.destroy(opts)}function buildOptions($cont,$slides,els,options,o){var startingSlideSpecified,opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{}),meta=$.isFunction($cont.data)?$cont.data(opts.metaAttr):null;meta&&(opts=$.extend(opts,meta)),opts.autostop&&(opts.countdown=opts.autostopCount||els.length);var cont=$cont[0];if($cont.data("cycle.opts",opts),opts.$cont=$cont,opts.stopCount=cont.cycleStop,opts.elements=els,opts.before=opts.before?[opts.before]:[],opts.after=opts.after?[opts.after]:[],!$.support.opacity&&opts.cleartype&&opts.after.push(function(){removeFilter(this,opts)}),opts.continuous&&opts.after.push(function(){go(els,opts,0,!opts.backwards)}),saveOriginalOpts(opts),$.support.opacity||!opts.cleartype||opts.cleartypeNoBg||clearTypeFix($slides),"static"==$cont.css("position")&&$cont.css("position","relative"),opts.width&&$cont.width(opts.width),opts.height&&"auto"!=opts.height&&$cont.height(opts.height),opts.startingSlide!==undefined?(opts.startingSlide=parseInt(opts.startingSlide,10),opts.startingSlide>=els.length||opts.startSlide<0?opts.startingSlide=0:startingSlideSpecified=!0):opts.backwards?opts.startingSlide=els.length-1:opts.startingSlide=0,opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)opts.randomMap.push(i);if(opts.randomMap.sort(function(a,b){return Math.random()-.5}),startingSlideSpecified)for(var cnt=0;cnt<els.length;cnt++)opts.startingSlide==opts.randomMap[cnt]&&(opts.randomIndex=cnt);else opts.randomIndex=1,opts.startingSlide=opts.randomMap[1]}else opts.startingSlide>=els.length&&(opts.startingSlide=0);opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;z=opts.backwards?first?first>=i?els.length+(i-first):first-i:els.length-i:first?i>=first?els.length-(i-first):first-i:els.length-i,$(this).css("z-index",z)}),$(els[first]).css("opacity",1).show(),removeFilter(els[first],opts),opts.fit&&(opts.aspect?$slides.each(function(){var $slide=$(this),ratio=opts.aspect===!0?$slide.width()/$slide.height():opts.aspect;opts.width&&$slide.width()!=opts.width&&($slide.width(opts.width),$slide.height(opts.width/ratio)),opts.height&&$slide.height()<opts.height&&($slide.height(opts.height),$slide.width(opts.height*ratio
vendor: 6,199 bytes, line 14
14))}):(opts.width&&$slides.width(opts.width),opts.height&&"auto"!=opts.height&&$slides.height(opts.height))),!opts.center||opts.fit&&!opts.aspect||$slides.each(function(){var $slide=$(this);$slide.css({"margin-left":opts.width?(opts.width-$slide.width())/2+"px":0,"margin-top":opts.height?(opts.height-$slide.height())/2+"px":0})}),!opts.center||opts.fit||opts.slideResize||$slides.each(function(){var $slide=$(this);$slide.css({"margin-left":opts.width?(opts.width-$slide.width())/2+"px":0,"margin-top":opts.height?(opts.height-$slide.height())/2+"px":0})});var reshape=(opts.containerResize||opts.containerResizeHeight)&&$cont.innerHeight()<1;if(reshape){for(var maxw=0,maxh=0,j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();w||(w=e.offsetWidth||e.width||$e.attr("width")),h||(h=e.offsetHeight||e.height||$e.attr("height")),maxw=w>maxw?w:maxw,maxh=h>maxh?h:maxh}opts.containerResize&&maxw>0&&maxh>0&&$cont.css({width:maxw+"px",height:maxh+"px"}),opts.containerResizeHeight&&maxh>0&&$cont.css({height:maxh+"px"})}var pauseFlag=!1;if(opts.pause&&$cont.bind("mouseenter.cycle",function(){pauseFlag=!0,this.cyclePause++,triggerPause(cont,!0)}).bind("mouseleave.cycle",function(){pauseFlag&&this.cyclePause--,triggerPause(cont,!0)}),supportMultiTransitions(opts)===!1)return!1;var requeue=!1;if(options.requeueAttempts=options.requeueAttempts||0,$slides.each(function(){var $el=$(this);if(this.cycleH=opts.fit&&opts.height?opts.height:$el.height()||this.offsetHeight||this.height||$el.attr("height")||0,this.cycleW=opts.fit&&opts.width?opts.width:$el.width()||this.offsetWidth||this.width||$el.attr("width")||0,$el.is("img")){var loading=0===this.cycleH&&0===this.cycleW&&!this.complete;if(loading){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100)return log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout),requeue=!0,!1;log("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return!0}),requeue)return!1;if(opts.cssBefore=opts.cssBefore||{},opts.cssAfter=opts.cssAfter||{},opts.cssFirst=opts.cssFirst||{},opts.animIn=opts.animIn||{},opts.animOut=opts.animOut||{},$slides.not(":eq("+first+")").css(opts.cssBefore),$($slides[first]).css(opts.cssFirst),opts.timeout){opts.timeout=parseInt(opts.timeout,10),opts.speed.constructor==String&&(opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed,10)),opts.sync||(opts.speed=opts.speed/2);for(var buffer="none"==opts.fx?0:"shuffle"==opts.fx?500:250;opts.timeout-opts.speed<buffer;)opts.timeout+=opts.speed}if(opts.easing&&(opts.easeIn=opts.easeOut=opts.easing),opts.speedIn||(opts.speedIn=opts.speed),opts.speedOut||(opts.speedOut=opts.speed),opts.slideCount=els.length,opts.currSlide=opts.lastSlide=first,opts.random?(++opts.randomIndex==els.length&&(opts.randomIndex=0),opts.nextSlide=opts.randomMap[opts.randomIndex]):opts.backwards?opts.nextSlide=0===opts.startingSlide?els.length-1:opts.startingSlide-1:opts.nextSlide=opts.startingSlide>=els.length-1?0:opts.startingSlide+1,!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))init($cont,$slides,opts);else if("custom"!=opts.fx&&!opts.multiFx)return log("unknown transition: "+opts.fx,"; slideshow terminating"),!1}var e0=$slides[first];return opts.skipInitializationCallbacks||(opts.before.length&&opts.before[0].apply(e0,[e0,e0,opts,!0]),opts.after.length&&opts.after[0].apply(e0,[e0,e0,opts,!0])),opts.next&&$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)}),opts.prev&&$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)}),(opts.pager||opts.pagerAnchorBuilder)&&buildPager(els,opts),exposeAddSlide(opts,els),opts}function saveOriginalOpts(opts){opts.original={before:[],after:[]},opts.original.cssBefore=$.extend({},opts.cssBefore),opts.original.cssAfter=$.extend({},opts.cssAfter),opts.original.animIn=$.extend({},opts.animIn),opts.original.animOut=$.extend({},opts.animOut),$.each(opts.before,function(){opts.original.before.push(this)}),$.each(opts.after,function(){opts.original.after.push(this)})}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){for(opts.multiFx=!0,opts.fxs=opts.fx.replace(/\s*/g,"").split(","),i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx],tx&&txs.hasOwnProperty(fx)&&$.isFunction(tx)||(log("discarding unknown transition: ",fx),opts.fxs.splice(i,1),i--)}if(!opts.fxs.length)return log("No valid transitions named; slideshow terminating."),!1}else if("all"==opts.fx){opts.multiFx=!0,opts.fxs=[];for(var p in txs)txs.hasOwnProperty(p)&&(tx=txs[p],txs.hasOwnProperty(p)&&$.isFunction(tx)&&opts.fxs.push(p))}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(20*Math.random())+30;for(i=0;r1>i;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0])}debug("randomized fx sequence: ",opts.fxs)}return!0}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];opts.autostopCount||opts.countdown++,els[prepend?"unshift":"push"](s),opts.els&&opts.els[prepend?"unshift":"push"](s),opts.slideCount=els.length,opts.random&&(opts.randomMap.push(opts.slideCount-1),opts.randomMap.sort(function(a,b){return Math.random()-.5})),$s.css("position","absolute"),$s[prepend?"prependTo":"appendTo"](opts.$cont),prepend&&(opts.currSlide++,opts.nextSlide++),$.support.opacity||!opts.cleartype||opts.cleartypeNoBg||clearTypeFix($s),opts.fit&&opts.width&&$s.width(opts.width),opts.fit&&opts.height&&"auto"!=opts.height&&$s.height(opts.height),s.cycleH=opts.fit&&opts.height?opts.height:$s.height(),s.cycleW=opts.fit&&opts.width?opts.width:$s.width(),$s.css(opts.cssBefore),(opts.pager||opts.pagerAnchorBuilder)&&$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts),$.isFunction(opts.onAddSlide)?opts.onAddSlide($s):$s.hide()}}function go(els,opts,manual,fwd){function queueNext(){var ms=0;opts.timeout;opts.timeout&&!opts.continuous?(ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd),"shuffle"==opts.fx&&(ms-=opts.speedOut)):opts.continuous&&p.
14cyclePause&&(ms=10),ms>0&&(p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards)},ms))}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(manual&&opts.busy&&opts.manualTrump&&(debug("manualTrump in go(), stopping active transition"),$(els).stop(!0,!0),opts.busy=0,clearTimeout(p.cycleTimeout)),opts.busy)return void debug("transition active, ignoring new tx request");if(p.cycleStop==opts.stopCount&&(0!==p.cycleTimeout||manual)){if(!manual&&!p.cyclePause&&!opts.bounce&&(opts.autostop&&--opts.countdown<=0||opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))return void(opts.end&&opts.end(opts));var changed=!1;if(!manual&&p.cyclePause||opts.nextSlide==opts.currSlide)queueNext();else{changed=!0;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height(),curr.cycleW=curr.cycleW||$(curr).width(),next.cycleH=next.cycleH||$(next).height(),next.cycleW=next.cycleW||$(next).width(),opts.multiFx&&(fwd&&(opts.lastFx===undefined||++opts.lastFx>=opts.fxs.length)?opts.lastFx=0:!fwd&&(opts.lastFx===undefined||--opts.lastFx<0)&&(opts.lastFx=opts.fxs.length-1),fx=opts.fxs[opts.lastFx]),opts.oneTimeFx&&(fx=opts.oneTimeFx,opts.oneTimeFx=null),$.fn.cycle.resetState(opts,fx),opts.before.length&&$.each(opts.before,function(i,o){p.cycleStop==opts.stopCount&&o.apply(next,[curr,next,opts,fwd])});var after=function(){opts.busy=0,$.each(opts.after,function(i,o){p.cycleStop==opts.stopCount&&o.apply(next,[curr,next,opts,fwd])}),p.cycleStop||queueNext()};debug("tx firing("+fx+"); currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide),opts.busy=1,opts.fxFn?opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent):$.isFunction($.fn.cycle[opts.fx])?$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent):$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent)}if(changed||opts.nextSlide==opts.currSlide){var roll;opts.lastSlide=opts.currSlide,opts.random?(opts.currSlide=opts.nextSlide,++opts.randomIndex==els.length&&(opts.randomIndex=0,opts.randomMap.sort(function(a,b){return Math.random()-.5})),opts.nextSlide=opts.randomMap[opts.randomIndex],opts.nextSlide==opts.currSlide&&(opts.nextSlide=opts.currSlide==opts.slideCount-1?0:opts.currSlide+1)):opts.backwards?(roll=opts.nextSlide-1<0,roll&&opts.bounce?(opts.backwards=!opts.backwards,opts.nextSlide=1,opts.currSlide=0):(opts.nextSlide=roll?els.length-1:opts.nextSlide-1,opts.currSlide=roll?0:opts.nextSlide+1)):(roll=opts.nextSlide+1==els.length,roll&&opts.bounce?(opts.backwards=!opts.backwards,opts.nextSlide=els.length-2,opts.currSlide=els.length-1):(opts.nextSlide=roll?0:opts.nextSlide+1,opts.currSlide=roll?els.length-1:opts.nextSlide-1))}changed&&opts.pager&&opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass)}}function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){for(var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);"none"!=opts.fx&&t-opts.speed<250;)t+=opts.speed;if(debug("calculated timeout: "+t+"; speed: "+opts.speed),t!==!1)return t}return opts.timeout}function advance(opts,moveForward){var val=moveForward?1:-1,els=opts.elements,p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout&&(clearTimeout(timeout),p.cycleTimeout=0),opts.random&&0>val)opts.randomIndex--,-2==--opts.randomIndex?opts.randomIndex=els.length-2:-1==opts.randomIndex&&(opts.randomIndex=els.length-1),opts.nextSlide=opts.randomMap[opts.randomIndex];else if(opts.random)opts.nextSlide=opts.randomMap[opts.randomIndex];else if(opts.nextSlide=opts.currSlide+val,opts.nextSlide<0){if(opts.nowrap)return!1;opts.nextSlide=els.length-1}else if(opts.nextSlide>=els.length){if(opts.nowrap)return!1;opts.nextSlide=0}var cb=opts.onPrevNextEvent||opts.prevNextClick;return $.isFunction(cb)&&cb(val>0,opts.nextSlide,els[opts.nextSlide]),go(els,opts,1,moveForward),!1}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts)}),opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass)}function clearTypeFix($slides){function hex(s){return s=parseInt(s,10).toString(16),s.length<2?"0"+s:s}function getBg(e){for(;e&&"html"!=e.nodeName.toLowerCase();e=e.parentNode){var v=$.css(e,"background-color");
vendor: 4,943 bytes, line 14
14if(v&&v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])}if(v&&"transparent"!=v)return v}return"#ffffff"}debug("applying clearType background-color hack"),$slides.each(function(){$(this).css("background-color",getBg(this))})}var ver="3.0.3";$.expr[":"].paused=function(el){return el.cyclePause},$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};return 0===this.length&&"stop"!=options?!$.isReady&&o.s?(log("DOM not ready, queuing slideshow"),$(function(){$(o.s,o.c).cycle(options,arg2)}),this):(log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)")),this):this.each(function(){var opts=handleArguments(this,options,arg2);if(opts!==!1){opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink,this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=this.cyclePause=0,this.cycleStop=0;var $cont=$(this),$slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children(),els=$slides.get();if(els.length<2)return void log("terminating; too few slides: "+els.length);var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2!==!1){var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);startTime&&(startTime+=opts2.delay||0,10>startTime&&(startTime=10),debug("first timeout: "+startTime),this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards)},startTime))}}})},$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx,opts.before=[],opts.after=[],opts.cssBefore=$.extend({},opts.original.cssBefore),opts.cssAfter=$.extend({},opts.original.cssAfter),opts.animIn=$.extend({},opts.original.animIn),opts.animOut=$.extend({},opts.original.animOut),opts.fxFn=null,$.each(opts.original.before,function(){opts.before.push(this)}),$.each(opts.original.after,function(){opts.after.push(this)});var init=$.fn.cycle.transitions[fx];$.isFunction(init)&&init(opts.$cont,$(opts.elements),opts)},$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName)})},$.fn.cycle.next=function(opts){advance(opts,1)},$.fn.cycle.prev=function(opts){advance(opts,0)},$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)?(a=opts.pagerAnchorBuilder(i,el),debug("pagerAnchorBuilder("+i+", el) returned: "+a)):a='<a href="#">'+(i+1)+"</a>",a){var $a=$(a);if(0===$a.parents("body").length){var arr=[];$p.length>1?($p.each(function(){var $clone=$a.clone(!0);$(this).append($clone),arr.push($clone[0])}),$a=$(arr)):$a.appendTo($p)}opts.pagerAnchors=opts.pagerAnchors||[],opts.pagerAnchors.push($a);var pagerFn=function(e){e.preventDefault(),opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;timeout&&(clearTimeout(timeout),p.cycleTimeout=0);var cb=opts.onPagerEvent||opts.pagerClick;$.isFunction(cb)&&cb(opts.nextSlide,els[opts.nextSlide]),go(els,opts,1,opts.currSlide<i)};/mouseenter|mouseover/i.test(opts.pagerEvent)?$a.hover(pagerFn,function(){}):$a.bind(opts.pagerEvent,pagerFn),/^click/.test(opts.pagerEvent)||opts.allowPagerClickBubble||$a.bind("click.cycle",function(){return!1});var cont=opts.$cont[0],pauseFlag=!1;opts.pauseOnPagerHover&&$a.hover(function(){pauseFlag=!0,cont.cyclePause++,triggerPause(cont,!0,!0)},function(){pauseFlag&&cont.cyclePause--,triggerPause(cont,!0,!0)})}},$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;return hops=fwd?c>l?c-l:opts.slideCount-l:l>c?l-c:l+opts.slideCount-c},$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide(),"undefined"==typeof opts.cssBefore.opacity&&(opts.cssBefore.opacity=1),opts.cssBefore.display="block",opts.slideResize&&w!==!1&&next.cycleW>0&&(opts.cssBefore.width=next.cycleW),opts.slideResize&&h!==!1&&next.cycleH>0&&(opts.cssBefore.height=next.cycleH),opts.cssAfter=opts.cssAfter||{},opts.cssAfter.display="none",$(curr).css("zIndex",opts.slideCount+(rev===!0?1:0)),$(next).css("zIndex",opts.slideCount+(rev===!0?0:1))},$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next),speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut,animInDelay=opts.animInDelay,animOutDelay=opts.animOutDelay;$n.css(opts.cssBefore),speedOverride&&(speedIn=speedOut="number"==typeof speedOverride?speedOverride:1,easeIn=easeOut=null);var fn=function(){$n.delay(animInDelay).animate(opts.animIn,speedIn,easeIn,function(){cb()})};$l.delay(animOutDelay).animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter),opts.sync||fn()}),opts.sync&&fn()},$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0),opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts),opts.cssBefore.opacity=0}),opts.animIn={opacity:1},opts.animOut={opacity:0}
14,opts.cssBefore={top:0,left:0}}},$.fn.cycle.ver=function(){return ver},$.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animInDelay:0,animOut:null,animOutDelay:0,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartypeNoBg:!1,containerResize:1,containerResizeHeight:0,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1e3,speedIn:null,speedOut:null,startingSlide:undefined,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}}(jQuery);
15}
16
17if (ntb_anims.animation == 'fadein' && ntb_anims.disable_anim == false) { // +++++++++++++++++++++++++++ fadein
18
19(function($) {
20
21    $.fn.newsTicker = function (options) {
22        var options = $.extend({}, $.fn.newsTicker.config, options);
23		
24		/* check that the passed element is actually in the DOM */
25		if ($(this).length == 0) {
26			if (window.console && window.console.log) {
27				window.console.log('Element does not exist in DOM!');
28			}
29			else {
30				alert('Element does not exist in DOM!');		
31			}
32			return false;
33		}
34		
35		/* ID of the identifier */
36		var newsID = '#' + $(this).attr('id');
37		$(newsID).hide();
38		
39        return this.each(function () {
40            /* initialize the elements in the collection */
41			var settings = {				
42				count: 0,
43				newsArr: {},
44				play: true,
45				contentLoaded: false,
46				interval:'',
47				clearIntrvl:0
48			};
49			
50			/* Next button click button handler */
51			$(options.nextBtnDiv).click(function() {
52				settings.clearIntrvl = 1;
53				putNews();
54			});
55			
56			/* Prev button click button handler */
57			$(options.prevBtnDiv).click(function() {
58				if (settings.count == 0) {
59					settings.count = countSize(settings.newsArr) -2;
60				}
61				else if (settings.count == 1) {
62					settings.count = countSize(settings.newsArr) -1;
63				}
64				else {
65					settings.count = settings.count - 2;
66				}
67				
68				if (settings.count < 0) {
69					settings.count = countSize(settings.newsArr)-1;
70				}
71				settings.clearIntrvl = 1;
72				putNews();
73			});
74			
75			/* Play/Pause button click button handler */
76			$(options.playPauseID).click(function() {
77				if(settings.play == true)
78				{
79					if(settings.interval)
80					{
81						settings.clearIntrvl = 1;
82						clearInterval(settings.interval);
83					}
84					settings.play= false;
85					debugError('Paused:'+settings.count);
86				}
87				else				
88				{
89					debugError('Play :'+settings.count);
90					settings.play= true;
91					putNews();
92				}
93			});
94			
95			initPage();
96			
97			function initPage()
98			{
99				populateNews();
100				
101				if(settings.contentLoaded)
102				{
103					settings.clearIntrvl = 1;
104					putNews();
105				}
106			}
107            
108			function runIntervals()
109			{
110				settings.clearIntrvl=0;	
111				settings.interval = setInterval(function(){ putNews() }, options.interval);
112					
113				$(options.newsData).hover(function() {
114						if(settings.interval)
115						{
116							settings.clearIntrvl = 1;
117                            if (ntb_anims.pause_fadein != '') {
118							clearInterval(settings.interval);
119                            }
120						}
121					 }, function(){
122						putNews();
123					 });
124			}
125         
126			/* Function to get the size of an Object*/
127			function countSize(obj) {
128			    var size = 0, key;
129			    for (key in obj) {
130			        if (obj.hasOwnProperty(key)) size++;
131			    }
132			    return size;
133			};
134
135			/* This function populates news from the array to newsData div */
136			function putNews()
137			{
138				debugError('in News putting :'+settings.count);
139				if(settings.clearIntrvl == 1)
140				{
141					if(settings.interval)
142						clearInterval(settings.interval);
143						
144				}
145			
146				$(options.newsData).fadeOut('slow',function(){
147					var news = settings.newsArr[settings.count].content;
148					
149					$(options.newsData).html(news).fadeIn('slow');
150					settings.count++;
151					if (settings.count == countSize(settings.newsArr) ) {
152						settings.count = 0;
153					}
154				});
155				
156				if(settings.clearIntrvl == 1)
157				{
158					if (ntb_anims.autostart_fadein != 1) {
159					runIntervals();
160					}
161				}
162			}	
163			
164			/* This function populates news array from the UL list */
165			function populateNews()
166			{
167				var tagType = $(newsID).get(0).tagName; 
168				
169				if (tagType != 'UL' ) {
170					debugError('Cannot use <' + tagType.toLowerCase() + '> type of element for this plugin - must of type <ul> or <ol>');
171					return false;
172				}
173				
174				if($(newsID + ' LI').length > 0) {
175					$(newsID + ' LI').each(function (i) {
176						// Populating the news array from LI elements
177						settings.newsArr[i] = { type: options.titleText, content: $(this).html()};
178					});		
179				}	
180				else {
181					debugError('There are no news in UL tag!');
182					return false;
183				}
184				
185				if (countSize(settings.newsArr < 1)) {
186					debugError('Couldn\'t find any content from the UL news!');
187					return false;
188				}
189				settings.contentLoaded = true;
190			}
191			
192			/* Function for handling debug and error messages */ 
193			function debugError(obj) {
194				if (options.debugMode) {
195					if (window.console && window.console.log) {
196						window.console.log(obj);
197					}
198					else {
199						alert(obj);			
200					}
201				}
202			}
203        });
204    };
205
206    $.fn.newsTicker.config = {
207        // set values and custom functions
208		interval: ntb_anims.timeout_fadein,
209		newsData: "#ntbne_five",
210		prevBtnDiv: ntb_anims.is_ntb_rtl ? "#next-button-ntb" : "#prev-button-ntb",
211		nextBtnDiv: ntb_anims.is_ntb_rtl ? "#prev-button-ntb" : "#next-button-ntb",
212		playPauseID: "#play-pause",
213		effect: "fadeIn",
214		debugMode:0
215    };
216	
217	$('#ntbne_five').newsTicker();
218
219})(jQuery);
220
221} else if (ntb_anims.animation == 'Scroll_Up_NTB' && ntb_anims.disable_anim == false) { // +++++++++++++++++++++++++++ Scroll_Up_NTB
222
223(function($) {
224
225        var ntb_scr_up = 'news_ticker_benaceur',
226                defaults = {
227                        max_rows: 3,
228                        speed: 500,
229                        duration: 4000,
230                        direction: 'up',
231                        autostart: 1,
232                        pauseOnHover: 1,
233                        nextButton: null,
234                        prevButton: null,
235                        startButton: null,
236                        stopButton: null,
237                        hasMoved: function() {},
238                        movingUp: function() {},
239                        movingDown: function() {},
240                        start: function() {},
241                        stop: function() {},
242                        pause: function() {},
243                        unpause: function() {}
244                };
245
246function ntb_Plugin(a, b) {
247    this.element = a, this.$el = $(a), this.options = $.extend({}, defaults, b), this._defaults = defaults, 
248    this._name = ntb_scr_up, this.moveInterval, this.state = 0, this.paused = 0, this.moving = 0, 
249    this.$el.is("ul") && this.init();
250}
251
252
253ntb_Plugin.prototype = {
254    init: function() {
255		
256	if (ntb_anims.enable_style_mobile) {	
257	var row__height = window.innerWidth < ntb_anims.screen_min_width ? ntb_anims.height_mobile - ntb_anims.bor : ntb_anims.height - ntb_anims.bor;
258    } else {
259	var row__height = ntb_anims.height - ntb_anims.bor;
260	}
261
262        this.$el.height(row__height * this.options.max_rows).css({
263            overflow: "hidden"
264        }), this.checkSpeed(), this.options.nextButton && $(this.options.nextButton).click(function(a) {
265            this.moveNext(), this.resetInterval();
266        }.bind(this)), this.options.prevButton && $(this.options.prevButton).click(function(a) {
267            this.movePrev(), this.resetInterval();
268        }.bind(this)), this.options.stopButton && "undefined" != typeof this.options.stopButton[0] && this.options.stopButton.click(function(a) {
269            this.stop();
270        }.bind(this)), this.options.startButton && "undefined" != typeof this.options.startButton[0] && this.options.startButton.click(function(a) {
271            this.start();
272        }.bind(this)), this.options.pauseOnHover && this.$el.hover(function() {
273            this.state && this.pause();
274        }.bind(this), function() {
275            this.state && this.unpause();
276        }.bind(this)), this.options.autostart && this.start();
277    },
278    start: function() {
279        this.state || (this.state = 1, this.resetInterval(), this.options.start());
280    },
281    stop: function() {
282        this.state && (clearInterval(this.moveInterval), this.state = 0, this.options.stop());
283    },
284    resetInterval: function() {
285        this.state && (clearInterval(this.moveInterval), this.moveInterval = setInterval(function() {
286            this.move();
287        }.bind(this), this.options.duration));
288    },
289    move: function() {
290        this.paused || this.moveNext();
291    },
292    moveNext: function() {
293        "down" === this.options.direction ? this.moveDown() : "up" === this.options.direction && this.moveUp();
294    },
295    movePrev: function() {
296        "down" === this.options.direction ? this.moveUp() : "up" === this.options.direction && this.moveDown();
297    },
298    pause: function() {
299        this.paused || (this.paused = 1), this.options.pause();
300    },
301    unpause: function() {
302        this.paused && (this.paused = 0), this.options.unpause();
303    },
304    moveDown: function() {
305	if (ntb_anims.enable_style_mobile) {
306	var row__height = window.innerWidth < ntb_anims.screen_min_width ? ntb_anims.height_mobile - ntb_anims.bor : ntb_anims.height - ntb_anims.bor;
307    } else {
308	var row__height = ntb_anims.height - ntb_anims.bor;
309	}
310        this.moving || (this.moving = 1, this.options.movingDown(), this.$el.children("li:last").detach().prependTo(this.$el).css("margin-top", "-" + row__height + "px").animate({
311            marginTop: "0px"
312        }, this.options.speed, function() {
313            this.moving = 0, this.options.hasMoved();
314        }.bind(this)));
315    },
316    moveUp: function() {
317        if (!this.moving) {
318            this.moving = 1, this.options.movingUp();
319            var a = this.$el.children("li:first");
320	if (ntb_anims.enable_style_mobile) {	
321	var row__height = window.innerWidth < ntb_anims.screen_min_width ? ntb_anims.height_mobile - ntb_anims.bor : ntb_anims.height - ntb_anims.bor;
322    } else {
323	var row__height = ntb_anims.height - ntb_anims.bor;
324	}
325            a.animate({
326                marginTop: "-" + row__height + "px"
327            }, this.options.speed, function() {
328                a.detach().css("margin-top", "0").appendTo(this.$el), this.moving = 0, this.options.hasMoved();
329            }.bind(this));
330        }
331    },
332    updateOption: function(a, b) {
333        "undefined" != typeof this.options[a] && (this.options[a] = b, "duration" != a && "speed" != a || (this.checkSpeed(), 
334        this.resetInterval()));
335    },
336    getState: function() {
337        return paused ? 2 : this.state;
338    },
339    checkSpeed: function() {
340        this.options.duration < Number(this.options.speed) + 25 && (this.options.speed = this.options.duration - 25);
341    },
342    destroy: function() {
343        this._destroy();
344    }
345}, $.fn[ntb_scr_up] = function(a) {
346    var b = arguments;
347    return this.each(function() {
348        var c = $(this), d = $.data(this, "plugin_" + ntb_scr_up), e = "object" == typeof a && a;
349        d || c.data("plugin_" + ntb_scr_up, d = new ntb_Plugin(this, e)), "string" == typeof a && d[a].apply(d, Array.prototype.slice.call(b, 1));
350    });
351};
352
353
354            $('#ntbne_five').news_ticker_benaceur({
355                max_rows: 1,
356				speed: ntb_anims.speed_slide_up_down,
357                duration: ntb_anims.timeout_slide_up_down,
358				direction: ntb_anims.updown_slide_up_down == 'up_slide_u_d' ? 'up' : 'down',
359				autostart: ntb_anims.autostart_slide_up_down != '' ? 0 : 1,
360                pauseOnHover: ntb_anims.pause_slide_up_down != '' ? 1 : 0,
361		        prevButton: ntb_anims.is_ntb_rtl ? "#next-button-ntb" : "#prev-button-ntb",
362		        nextButton: ntb_anims.is_ntb_rtl ? "#prev-button-ntb" : "#next-button-ntb"
363            });
364})(jQuery);
365
366} else if (ntb_anims.animation == 'ScrollNTB') { // +++++++++++++++++++++++++++ Scroll-H
367
368if (ntb_anims.disable_anim == false) {
369	
370(function($) {
371$(".n_t_ntb_bimg").show();
372})(jQuery);
373	
374!function(a){function b(b,c,d){b.bind("marquee",function(b,e){var f=a(this),g=parseInt(f.parent().width()),h=parseInt(f.width()),i=parseInt(f.position().left),j=c;switch(d){case"right":"undefined"==typeof e?(f.css({left:g}),g=-h):g=i-(h+g);break;default:"undefined"==typeof e?f.css({left:-h}):g+=i+h}f.animate({left:g},{duration:j,easing:"linear",complete:function(){f.trigger("marquee")},step:function(){"right"==d?parseInt(f.position().left)<-parseInt(f.width())&&(f.stop(),f.trigger("marquee")):parseInt(f.position().left)>parseInt(f.parent().width())&&(f.stop(),f.trigger("marquee"))}})}).trigger("marquee");var e=ntb_anims.mouse;1==e&&(b.mouseover(function(){a(this).stop()}),b.mouseout(function(){a(this).trigger("marquee",["resume"])}))}var c=a("#scroll-ntb-elem"),d=4e3*ntb_anims.speed_scr,e=ntb_anims.ori_scr;b(c,d,e)}(jQuery);
375
376} else {
377	
378(function($) {
379$(".ntb_img_post_t_scrollntb").css({"display": "none"});
380$(".n_t_ntb_bimg").css({"margin": "initial"});	
381setTimeout(function(){
382$(".n_t_ntb_bimg").show();
383}, 300);
384})(jQuery);
385
386}
387
388} else if (ntb_anims.animation == 'TickerNTB') { // +++++++++++++++++++++++++++ typing 1
389
390(function($) {
391	
392	$.fn.ticker = function(options) { //$(settings.dom.revealElem).hide();
393		// Extend our default options with those provided.
394		// Note that the first arg to extend is an empty object -
395		// this is to keep from overriding our "defaults" object.
396		var opts = $.extend({}, $.fn.ticker.defaults, options); 
397
398		// check that the passed element is actually in the DOM
399		if ($(this).length == 0) {
400			if (window.console && window.console.log) {
401				window.console.log('Element does not exist in DOM!');
402			}
403			else {
404				alert('Element does not exist in DOM!');		
405			}
406			return false;
407		}
408		
409		/* Get the id of the UL to get our news content from */
410		var newsID = '#' + $(this).attr('id');
411
412		/* Get the tag type - we will check this later to makde sure it is a UL tag */
413		var tagType = $(this).get(0).tagName; 	
414
415		return this.each(function() { 
416			// get a unique id for this ticker
417			var uniqID = getUniqID();
418			
419                var arrData_tp1 = {
420					contentID: '#ticker-content-' + uniqID,
421					titleID: '#ntb--title-' + uniqID,
422					titleElem: '#ntb--title-' + uniqID + ' SPAN',
423					tickerID : '#ticker',
424					wrapperID: '#ticker-wrapper-' + uniqID,
425					revealID: '#ticker-swipe-' + uniqID,
426					revealElem: '#ticker-swipe-' + uniqID + ' SPAN',
427					controlsID: '#ticker-controls-' + uniqID,
428					playPauseID: '#play-pause-' + uniqID
429                };
430	
431		        if(ntb_anims.np_img_no_scr_typ == 'enable') {
432		        arrData_tp1.prevID = ntb_anims.is_ntb_rtl ? "#next-button-ntb" : "#prev-button-ntb"; // add to arrData_tp1 array
433				arrData_tp1.nextID = ntb_anims.is_ntb_rtl ? "#prev-button-ntb" : "#next-button-ntb"; // add to arrData_tp1 array
434		        } else {
435		        arrData_tp1.prevID = ''; // add to arrData_tp1 array
436				arrData_tp1.nextID = ''; // add to arrData_tp1 array
437				}
438			
439			/* Internal vars */
440			var settings = {				
441				position: 0,
442				time: 0,
443				distance: 0,
444				newsArr: {},
445				play: ntb_anims.disable_anim ? false : true,
446				paused: ntb_anims.pause__typing == 1 ? false : true,
447				contentLoaded: false,
448				dom: arrData_tp1
449			};
450
451			// if we are not using a UL, display an error message and stop any further execution
452			if (tagType != 'UL' && tagType != 'OL' && opts.htmlFeed === true) {
453				debugError('Cannot use <' + tagType.toLowerCase() + '> type of element for this plugin - must of type <ul> or <ol>');
454				return false;
455			}
456
457			// set the ticker direction
458			opts.direction == 'rtl' ? opts.direction = 'right' : opts.direction = 'left';
459			
460			// lets go...
461			initialisePage();
462			/* Function to get the size of an Object*/
463			function countSize(obj) {
464			    var size = 0, key;
465			    for (key in obj) {
466			        if (obj.hasOwnProperty(key)) size++;
467			    }
468			    return size;
469			};
470
471			function getUniqID() {
472				var newDate = new Date;
473				return newDate.getTime();			
474			}
475			
476			/* Function for handling debug and error messages */ 
477			function debugError(obj) {
478				if (opts.debugMode) {
479					if (window.console && window.console.log) {
480						window.console.log(obj);
481					}
482					else {
483						alert(obj);			
484					}
485				}
486			}
487
488        pauseTicker(); // show the first content without animatin (modified)
489
490			/* Function to setup the page */
491			function initialisePage() {
492				// process the content for this ticker
493				processContent();
494				
495				// add our HTML structure for the ticker to the DOM
496				$(newsID).wrap('<div id="' + settings.dom.wrapperID.replace('#', '') + '"></div>');
497				
498				// remove any current content inside this ticker
499				$(settings.dom.wrapperID).children().remove();
500				
501				$(settings.dom.wrapperID).append('<div id="' + settings.dom.tickerID.replace('#', '') + '" class="ticker"><p id="' + settings.dom.contentID.replace('#', '') + '" class="ticker-content"></p><div id="' + settings.dom.revealID.replace('#', '') + '" class="ticker-swipe"><span><!-- --></span></div></div>');
502				$(settings.dom.wrapperID).removeClass('no-js').addClass('ticker-wrapper has-js ' + opts.direction);
503				// hide the ticker
504				$(settings.dom.tickerElem + ',' + settings.dom.contentID).hide();
505				// add the controls to the DOM if required
506				if (opts.controls) {
507					// add related events - set functions to run on given event
508					$(document).on('click mouseover mousedown mouseout mouseup', settings.dom.controlsID, function (e) {
509						var button = e.target.id;
510						if (e.type == 'click') {	
511							switch (button) {
512								case settings.dom.prevID.replace('#', ''):
513									// show previous item
514									settings.paused = true;
515									$(settings.dom.playPauseID).addClass('paused');
516									manualChangeContent('prev');
517									break;
518								case settings.dom.nextID.replace('#', ''):
519									// show next item
520									settings.paused = true;
521									$(settings.dom.playPauseID).addClass('paused');
522									manualChangeContent('next');
523									break;
524								case settings.dom.playPauseID.replace('#', ''):
525									// play or pause the ticker
526									if (settings.play == true) {
527										settings.paused = true;
528										$(settings.dom.playPauseID).addClass('paused');
529										pauseTicker();
530									}
531									else {
532										settings.paused = false;
533										$(settings.dom.playPauseID).removeClass('paused');
534										restartTicker();
535									}
536									break;
537							}	
538						}
539						else if (e.type == 'mouseover' && $('#' + button).hasClass('controls')) {
540							$('#' + button).addClass('over');
541						}
542						else if (e.type == 'mousedown' && $('#' + button).hasClass('controls')) {
543							$('#' + button).addClass('down');
544						}
545						else if (e.type == 'mouseup' && $('#' + button).hasClass('controls')) {
546							$('#' + button).removeClass('down');
547						}
548						else if (e.type == 'mouseout' && $('#' + button).hasClass('controls')) {
549							$('#' + button).removeClass('over');
550						}
551					});
552					// add controls HTML to DOM
553					$(settings.dom.wrapperID).append('<ul id="' + settings.dom.controlsID.replace('#', '') + '" class="ticker-controls"><li id="' + settings.dom.playPauseID.replace('#', '') + '" class="jnt-play-pause controls"><a href=""><!-- --></a></li><li id="' + settings.dom.prevID.replace('#', '') + '" class="jnt-prev controls"><a href=""><!-- --></a></li><li id="' + settings.dom.nextID.replace('#', '') + '" class="jnt-next controls"><a href=""><!-- --></a></li></ul>');
554				}
555				if (opts.displayType != 'fade') {
556                	// add mouse over on the content
557               		$(settings.dom.contentID).mouseover(function () {
558               			if (settings.paused == false) {
559               				pauseTicker();
560               			}
561               		}).mouseout(function () {
562               			if (settings.paused == false) {
563               				restartTicker();
564               			}
565               		});
566				}
567				// we may have to wait for the ajax call to finish here
568				if (!opts.ajaxFeed) {
569					setupContentAndTriggerDisplay();
570				}
571			}
572
573			/* Start to process the content for this ticker */
574			function processContent() {
575				// check to see if we need to load content
576				if (settings.contentLoaded == false) {
577					// construct content
578					if (opts.ajaxFeed) {
579						if (opts.feedType == 'xml') {							
580							$.ajax({
581								url: opts.feedUrl,
582								cache: false,
583								dataType: opts.feedType,
584								async: true,
585								success: function(data){
586									count = 0;	
587									// get the 'root' node
588									for (var a = 0; a < data.childNodes.length; a++) {
589										if (data.childNodes[a].nodeName == 'rss') {
590											xmlContent = data.childNodes[a];
591										}
592									}
593									// find the channel node
594									for (var i = 0; i < xmlContent.childNodes.length; i++) {
595										if (xmlContent.childNodes[i].nodeName == 'channel') {
596											xmlChannel = xmlContent.childNodes[i];
597										}		
598									}
599									// for each item create a link and add the article title as the link text
600									for (var x = 0; x < xmlChannel.childNodes.length; x++) {
601										if (xmlChannel.childNodes[x].nodeName == 'item') {
602											xmlItems = xmlChannel.childNodes[x];
603											var title, link = false;
604											for (var y = 0; y < xmlItems.childNodes.length; y++) {
605												if (xmlItems.childNodes[y].nodeName == 'title') {      												    
606													title = xmlItems.childNodes[y].lastChild.nodeValue;
607												}
608												else if (xmlItems.childNodes[y].nodeName == 'link') {												    
609													link = xmlItems.childNodes[y].lastChild.nodeValue; 
610												}
611												if ((title !== false && title != '') && link !== false) {
612												    settings.newsArr['item-' + count] = { type: opts.titleText, content: '<a href="' + link + '">' + title + '</a>' };
613												    count++;												    
614													title = false;												    
615													link = false;
616												}
617											}	
618										}		
619									}			
620									// quick check here to see if we actually have any content - log error if not
621									if (countSize(settings.newsArr < 1)) {
622										debugError('Couldn\'t find any content from the XML feed for the ticker to use!');
623										return false;
624									}
625									settings.contentLoaded = true;
626									setupContentAndTriggerDisplay();
627								}
628							});							
629						}
630						else {
631							debugError('Code Me!');	
632						}						
633					}
634					else if (opts.htmlFeed) { 
635						if($(newsID + ' LI').length > 0) {
636							$(newsID + ' LI').each(function (i) {
637								// maybe this could be one whole object and not an array of objects?
638								settings.newsArr['item-' + i] = { type: opts.titleText, content: $(this).html()};
639							});		
640						}	
641						else {
642							debugError('Couldn\'t find HTML any content for the ticker to use!');
643							return false;
644						}
645					}
646					else {
647						debugError('The ticker is set to not use any types of content! Check the settings for the ticker.');
648						return false;
649					}					
650				}			
651			}
652
653			function setupContentAndTriggerDisplay() {
654
655				settings.contentLoaded = true;
656
657				// update the ticker content with the correct item
658				// insert news content into DOM
659				$(settings.dom.titleElem).html(settings.newsArr['item-' + settings.position].type);
660				$(settings.dom.contentID).html(settings.newsArr['item-' + settings.position].content);
661
662				// set the next content item to be used - loop round if we are at the end of the content
663				if (settings.position == (countSize(settings.newsArr) -1)) {
664					settings.position = 0;
665				}
666				else {		
667					settings.position++;
668				}			
669				
670				// start the ticker animation						
671				revealContent();		
672
673			}
674			
675$(document).ready(NTBresizefunReveal);
676$(window).on('resize',NTBresizefunReveal);
677function NTBresizefunReveal() {
678
679	var sw = $('.news-ticker-ntb').width();
680    var swww = sw - ntb_anims.typ1_margin_mobile;
681	var scr_typ = ntb_anims.np_img_no_scr_typ == 'enable' ? 54 : 0;
682	var scr_typDT = ntb_anims.disable_title != '1' ? ntb_anims.width_title_background : 0;
683    var sww = sw - (Number(scr_typDT) + Number(scr_typ) + 5);						
684	
685if (ntb_anims.enable_style_mobile == 1) {
686if( window.innerWidth < ntb_anims.screen_min_width ) {
687$(settings.dom.revealID + ',' + settings.dom.revealElem).hide(); // show the first content without animatin (modified)
688$(settings.dom.contentID).css('max-width', swww + 'px');	
689} else {
690$(settings.dom.revealID + ',' + settings.dom.revealElem).hide(); // show the first content without animatin (modified)
691$(settings.dom.contentID).css('max-width', sww + 'px');	
692}
693} else {
694$(settings.dom.revealID + ',' + settings.dom.revealElem).hide(); // show the first content without animatin (modified)
695$(settings.dom.contentID).css('max-width', sww + 'px');	
696}
697
698}
699
700			// slide back cover or fade in content
701			function revealContent() {
702						
703
704				distance = $(settings.dom.contentID).width();
705				//var distance = measureWidth(settings.dom.contentID);
706				time = distance / opts.speed;
707
708				$(settings.dom.contentID).css('opacity', '1');
709				if(settings.play) {	
710
711					// get the width of the title element to offset the content and reveal
712					var offset = $(settings.dom.titleID).width();
713
714					$(settings.dom.revealID).css(opts.direction, offset + 'px');
715					// show the reveal element and start the animation
716					if (opts.displayType == 'fade') {
717						// fade in effect ticker
718						$(settings.dom.revealID).hide(0, function () {
719							$(settings.dom.contentID).css(opts.direction, offset + 'px').fadeIn(opts.fadeInSpeed, postReveal);
720						});						
721					}
722					else if (opts.displayType == 'scroll') {
723						// to code
724					}
725					else {
726	
727						// default bbc scroll effect
728						$(settings.dom.revealElem).show(0, function () {
729							$(settings.dom.contentID).show();
730							// set our animation direction
731							animationAction = opts.direction == 'right' ? { marginRight: distance + 'px'} : { marginLeft: distance + 'px' };
732							$(settings.dom.revealID).css('margin-' + opts.direction, '0px').delay(0).animate(animationAction, time, 'linear', postReveal);
733						});	
734						
735					}
736				}
737				else {
738					return false;					
739				}
740
741			};
742
743
744			// here we hide the current content and reset the ticker elements to a default state ready for the next ticker item
745			function postReveal() {				
746				if(settings.play) {
747
748                    if(ntb_anims.autostart_typ1 == 1) {
749                    $(settings.dom.revealElem).hide();
750					} else {
751					// we have to separately fade the content out here to get around an IE bug - needs further investigation
752					$(settings.dom.contentID).delay(opts.pauseOnItems).fadeOut(opts.fadeOutSpeed);
753					// deal with the rest of the content, prepare the DOM and trigger the next ticker
754					if (opts.displayType == 'fade') {
755						$(settings.dom.contentID).fadeOut(opts.fadeOutSpeed, function () {
756							$(settings.dom.wrapperID)
757								.find(settings.dom.revealElem + ',' + settings.dom.contentID)
758									.hide()
759								.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
760									.show()
761								.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
762									.removeAttr('style');								
763							setupContentAndTriggerDisplay();						
764						});
765					}
766					else {
767						$(settings.dom.revealID).hide(0, function () {
768							$(settings.dom.contentID).fadeOut(opts.fadeOutSpeed, function () {
769								$(settings.dom.wrapperID)
770									.find(settings.dom.revealElem + ',' + settings.dom.contentID)
771										.hide()
772									.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
773										.show()
774									.end().find(settings.dom.tickerID + ',' + settings.dom.revealID)
775										.removeAttr('style');								
776								setupContentAndTriggerDisplay();						
777							});
778						});	
779					}
780					}
781				}
782				else {
783					$(settings.dom.revealElem).hide();
784				}
785			}
786
787			// pause ticker
788			function pauseTicker() {				
789				settings.play = true;
790				// stop animation and show content - must pass "true, true" to the stop function, or we can get some funky behaviour
791				$(settings.dom.tickerID + ',' + settings.dom.revealID + ',' + settings.dom.titleID + ',' + settings.dom.titleElem + ',' + settings.dom.revealElem + ',' + settings.dom.contentID).stop();
792				$(settings.dom.revealID + ',' + settings.dom.revealElem).hide();
793				$(settings.dom.wrapperID)
794					.find(settings.dom.titleID + ',' + settings.dom.titleElem).show()
795						.end().find(settings.dom.contentID).show();
796			}
797
798			// play ticker
799			function restartTicker() {				
800				settings.play = true;
801				settings.paused = false;
802				// start the ticker again
803				postReveal();	
804			}
805
806			// change the content on user input
807			function manualChangeContent(direction) {
808				pauseTicker();
809				switch (direction) {
810					case 'prev':
811						if (settings.position == 0) {
812							settings.position = countSize(settings.newsArr) -2;
813						}
814						else if (settings.position == 1) {
815							settings.position = countSize(settings.newsArr) -1;
816						}
817						else {
818							settings.position = settings.position - 2;
819						}
820						$(settings.dom.titleElem).html(settings.newsArr['item-' + settings.position].type);
821						$(settings.dom.contentID).html(settings.newsArr['item-' + settings.position].content);						
822						break;
823					case 'next':
824						$(settings.dom.titleElem).html(settings.newsArr['item-' + settings.position].type);
825						$(settings.dom.contentID).html(settings.newsArr['item-' + settings.position].content);
826						break;
827				}
828				// set the next content item to be used - loop round if we are at the end of the content
829				if (settings.position == (countSize(settings.newsArr) -1)) {
830					settings.position = 0;
831				}
832				else {		
833					settings.position++;
834				}	
835			}
836		});  
837		
838	}; 
839	
840	// plugin defaults - added as a property on our plugin function
841	$.fn.ticker.defaults = {
842		speed: '0.' + ntb_anims.speed_no_scr_typ,			
843		ajaxFeed: false,
844		feedUrl: '',
845		feedType: 'xml',
846		displayType: 'reveal',
847		htmlFeed: true,
848		debugMode: true,
849		controls: true,
850		titleText: ntb_anims.titletext_tp1,	
851		direction: ntb_anims.direction_tp1,	
852		pauseOnItems: ntb_anims.pause_on_items_tp1,
853		fadeInSpeed: 600,
854		fadeOutSpeed: 300
855	};	
856
857	// start the ticker 
858	$('#ntbne2').ticker();
859
860	// hide the release history when the page loads
861	$('#release-wrapper').css('margin-top', '-' + ($('#release-wrapper').height() + 20) + 'px');
862
863	// show/hide the release history on click
864	$('a[href="#release-history"]').toggle(function () {	
865		$('#release-wrapper').animate({
866			marginTop: '0px'
867		}, 600, 'linear');
868	}, function () {
869		$('#release-wrapper').animate({
870			marginTop: '-' + ($('#release-wrapper').height() + 20) + 'px'
871		}, 600, 'linear');
872	});	
873
874					if (ntb_anims.is_ntb_rtl) {
875                    $('#prev-button-ntb').prop('title', ntb_anims.next);	
876                    $('#next-button-ntb').prop('title', ntb_anims.prev);	
877					} else {
878                    $('#prev-button-ntb').prop('title', ntb_anims.prev);	
879                    $('#next-button-ntb').prop('title', ntb_anims.next);	
880					}
881	
882})(jQuery);
883
884} else if (ntb_anims.is_two == true && ntb_anims.disable_anim == false) { // +++++++++++++++++++++++++++ two
885
886(function($) {
887"use strict";
888
889$(document).ready(NTBresizefun1);
890$(window).on('resize',NTBresizefun1);
891function NTBresizefun1() {
892$("#ntbne_five").css({"overflow": "hidden"});
893}
894
895switch (ntb_anims.animation) {
896	
897    case 'curtainY':
898
899$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
900	$slides.css(ntb_anims.rtl , "0px");
901	opts.before.push(function(curr, next, opts) {
902		$.fn.cycle.commonReset(curr,next,opts,true,false,true);
903		opts.cssBefore.top = next.cycleH;
904		opts.animIn.top = 0;
905		opts.animIn.height = next.cycleH;
906		opts.animOut.top = curr.cycleH;
907		opts.animOut.height = 0;
908	});
909	opts.cssBefore.height = 0;
910	ntb_anims.ocb = 0;
911};
912	
913        break;
914    case 'curtainX':
915	
916$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
917	$slides.css(ntb_anims.rtl , "0px");
918	opts.before.push(function(curr, next, opts) {
919		$.fn.cycle.commonReset(curr,next,opts,false,true,true);
920		ntb_anims.ocb = next.cycleW;
921		ntb_anims.oai = 0;
922		opts.animIn.width = this.cycleW;
923		ntb_anims.oao = curr.cycleW;
924		opts.animOut.width = 0;
925	});
926	opts.cssBefore.top = 0;
927	opts.cssBefore.width = 0;
928};
929		
930        break;
931    case 'turnUp':
932
933$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
934	$slides.css(ntb_anims.rtl , "0px");
935	opts.before.push(function(curr, next, opts) {
936		$.fn.cycle.commonReset(curr,next,opts,true,false);
937		opts.cssBefore.top = next.cycleH;
938		opts.animIn.height = next.cycleH;
939		opts.animOut.width = next.cycleW;
940	});
941	opts.cssFirst.top = 0;
942	opts.cssBefore.left = 0;
943	opts.cssBefore.height = 0;
944	opts.animIn.top = 0;
945	opts.animOut.height = 0;
946};
947	
948        break;
949    case 'turnDown':
950
951$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
952	$slides.css(ntb_anims.rtl , "0px");
953	opts.before.push(function(curr, next, opts) {
954		$.fn.cycle.commonReset(curr,next,opts,true,false);
955		opts.animIn.height = next.cycleH;
956		opts.animOut.top   = curr.cycleH;
957	});
958	opts.cssFirst.top = 0;
959	opts.cssBefore.left = 0;
960	opts.cssBefore.top = 0;
961	opts.cssBefore.height = 0;
962	opts.animOut.height = 0;
963};
964		
965        break;
966    case 'turnLeft':
967	
968$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
969	$slides.css(ntb_anims.rtl , "0px");
970	opts.before.push(function(curr, next, opts) {
971		$.fn.cycle.commonReset(curr,next,opts,false,true);
972		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = next.cycleW : opts.cssBefore.left = next.cycleW;
973		cssBeforeO;
974		opts.animIn.width = next.cycleW;
975	});
976	
977		var animO = ntb_anims.isrtl ? opts.animIn.right = 0 : opts.animIn.left = 0;
978	opts.cssBefore.top = 0;
979	opts.cssBefore.width = 0;
980	animO;
981	opts.animOut.width = 0;
982};
983		
984        break;
985    case 'turnRight':
986
987$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
988	$slides.css(ntb_anims.rtl , "0px");
989	opts.before.push(function(curr, next, opts) {
990		$.fn.cycle.commonReset(curr,next,opts,false,true);
991		opts.animIn.width = next.cycleW;
992		var animOutO = ntb_anims.isrtl ? opts.animOut.right = next.cycleW : opts.animOut.left = next.cycleW;
993		animOutO;
994	});
995	
996	var animO = ntb_anims.isrtl ? opts.animIn.right = 0 : opts.animIn.left = 0;
997		var arrData = { top: 0, width: 0 };
998		if (ntb_anims.isrtl) {
999		arrData.right = 0; 
1000		} else {
1001		arrData.left = 0;	
1002		}
1003	$.extend(opts.cssBefore, arrData);
1004	animO;
1005	opts.animOut.width = 0;
1006};
1007	
1008        break;
1009    case 'slideY':
1010
1011$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
1012	$slides.css(ntb_anims.rtl , "0px");
1013	opts.before.push(function(curr, next, opts) {
1014		$(opts.elements).not(curr).hide();
1015		$.fn.cycle.commonReset(curr,next,opts,true,false);
1016		opts.animIn.height = next.cycleH;
1017	});
1018	opts.cssBefore.left = 0;
1019	opts.cssBefore.top = 0;
1020	opts.cssBefore.height = 0;
1021	opts.animIn.height = 'show';
1022	opts.animOut.height = 0;
1023};
1024	
1025        break;
1026    case 'slideX':
1027
1028$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
1029	$slides.css(ntb_anims.rtl , "0px");
1030	opts.before.push(function(curr, next, opts) {
1031		$(opts.elements).not(curr).hide();
1032		$.fn.cycle.commonReset(curr,next,opts,false,true);
1033		opts.animIn.width = next.cycleW;
1034	});
1035	
1036		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = 0 : opts.cssBefore.left = 0;
1037	cssBeforeO;
1038	opts.cssBefore.top = 0;
1039	opts.cssBefore.width = 0;
1040	opts.animIn.width = 'show';
1041	opts.animOut.width = 0;
1042};
1043	
1044        break;
1045    case 'growX':
1046
1047$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
1048	$slides.css(ntb_anims.rtl , "0px");
1049	opts.before.push(function(curr, next, opts) {
1050		$.fn.cycle.commonReset(curr,next,opts,false,true);
1051		opts.cssBefore.left = this.cycleW/2;
1052		opts.animIn.left = 0;
1053		opts.animIn.width = this.cycleW;
1054		opts.animOut.left = 0;
1055	});
1056	opts.cssBefore.top = 0;
1057	opts.cssBefore.width = 0;
1058};
1059	
1060        break;
1061    case 'growY':
1062
1063$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
1064	$slides.css(ntb_anims.rtl , "0px");
1065	opts.before.push(function(curr, next, opts) {
1066		$.fn.cycle.commonReset(curr,next,opts,true,false);
1067		opts.cssBefore.top = this.cycleH/2;
1068		opts.animIn.top = 0;
1069		opts.animIn.height = this.cycleH;
1070		opts.animOut.top = 0;
1071	});
1072	opts.cssBefore.height = 0;
1073	opts.cssBefore.left = 0;
1074};
1075	
1076        break;
1077    case 'scrollLeft':
1078
1079$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
1080    $cont.css({'z-index': '1'});
1081	$slides.css(ntb_anims.rtl , "0px");
1082	opts.before.push($.fn.cycle.commonReset);
1083	var w = $cont.width();
1084		var cssFirstO = ntb_anims.isrtl ? opts.cssFirst.right = 0 : opts.cssFirst.left = 0;
1085		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = w : opts.cssBefore.left = w;
1086		var animInO = ntb_anims.isrtl ? opts.animIn.right = 0 : opts.animIn.left = 0;
1087		var animOutO = ntb_anims.isrtl ? opts.animOut.right = 0-w : opts.animOut.left = 0-w;
1088	
1089	cssFirstO;
1090	cssBeforeO;
1091	opts.cssBefore.top = 0;
1092	animInO;
1093	animOutO;
1094};
1095		
1096        break;
1097    case 'scrollRight':
1098
1099$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
1100	$cont.css({'overflow': 'hidden'});
1101	$slides.css(ntb_anims.rtl , "0px");
1102	opts.before.push($.fn.cycle.commonReset);
1103	var w = $cont.width();
1104		var cssFirstO = ntb_anims.isrtl ? opts.cssFirst.right = 0 : opts.cssFirst.left = 0;
1105		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = -w : opts.cssBefore.left = -w;
1106		var animInO = ntb_anims.isrtl ? opts.animIn.right = 0 : opts.animIn.left = 0;
1107		var animOutO = ntb_anims.isrtl ? opts.animOut.right = w : opts.animOut.left = w;
1108	
1109	cssFirstO;
1110	cssBeforeO;
1111	opts.cssBefore.top = 0;
1112	animInO;
1113	animOutO;
1114};
1115	
1116        break;
1117    case 'fadeUp':
1118
1119$.fn.cycle.transitions.fadeUp = function($cont, $slides, opts) {
1120	$slides.css(ntb_anims.rtl , "0px");
1121	opts.before.push(function(curr, next, opts) {
1122		$.fn.cycle.commonReset(curr,next,opts,false,false);
1123		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = next.cycleW/2 : opts.cssBefore.left = next.cycleW/2;
1124		cssBeforeO;
1125		opts.cssBefore.top = next.cycleH;
1126		var arrData = { top: 0, width: next.cycleW, height: next.cycleH };
1127		if (ntb_anims.isrtl) {
1128		arrData.right = 0; 
1129		} else {
1130		arrData.left = 0;	
1131		}
1132		$.extend(opts.animIn, arrData);
1133	});
1134	opts.cssBefore.width = 0;
1135	opts.cssBefore.height = 0;
1136	opts.animOut.opacity = 0;
1137};
1138		
1139        break;
1140    case 'fadeLR':
1141
1142$.fn.cycle.transitions.fadeLR = function($cont, $slides, opts) {
1143	$slides.css(ntb_anims.rtl , "0px");
1144	opts.before.push(function(curr, next, opts) {
1145		$.fn.cycle.commonReset(curr,next,opts,false,false);
1146		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = next.cycleW : opts.cssBefore.left = next.cycleW;
1147		cssBeforeO;
1148		opts.cssBefore.top = next.cycleH;
1149		var arrData = { top: 0, width: next.cycleW, height: next.cycleH };
1150		if (ntb_anims.isrtl) {
1151		arrData.right = 0; 
1152		} else {
1153		arrData.left = 0;	
1154		}
1155		$.extend(opts.animIn, arrData);
1156	});
1157	opts.cssBefore.width = 0;
1158	opts.cssBefore.height = 0;
1159	opts.animOut.opacity = 0;
1160};
1161	
1162        break;
1163    case 'fadeZoom':
1164
1165$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
1166	$slides.css(ntb_anims.rtl , "0px");
1167	opts.before.push(function(curr, next, opts) {
1168		$.fn.cycle.commonReset(curr,next,opts,false,false);
1169		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = next.cycleW/2 : opts.cssBefore.left = next.cycleW/2;
1170		cssBeforeO;
1171		opts.cssBefore.top = next.cycleH/2;
1172		var arrData = { top: 0, width: next.cycleW, height: next.cycleH };
1173		if (ntb_anims.isrtl) {
1174		arrData.right = 0; 
1175		} else {
1176		arrData.left = 0;	
1177		}
1178		$.extend(opts.animIn, arrData);
1179	});
1180	opts.cssBefore.width = 0;
1181	opts.cssBefore.height = 0;
1182	opts.animOut.opacity = 0;
1183};
1184		
1185        break;
1186    case 'zoom':
1187
1188$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
1189	$slides.css(ntb_anims.rtl , "0px");
1190	opts.before.push(function(curr, next, opts) {
1191		$.fn.cycle.commonReset(curr,next,opts,false,false,true);
1192		opts.cssBefore.top = next.cycleH/2;
1193		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = next.cycleW/2 : opts.cssBefore.left = next.cycleW/2;
1194		cssBeforeO;
1195		
1196		var arrData1 = { top: 0, width: next.cycleW, height: next.cycleH };
1197		if (ntb_anims.isrtl) {
1198		arrData1.right = 0; 
1199		} else {
1200		arrData1.left = 0;	
1201		}
1202		
1203		var arrData2 = { width: 0, height: 0, top: curr.cycleH/2 };
1204		if (ntb_anims.isrtl) {
1205		arrData2.right = curr.cycleW/2; 
1206		} else {
1207		arrData2.left = curr.cycleW/2;	
1208		}
1209		
1210		$.extend(opts.animIn, arrData1);
1211		$.extend(opts.animOut, arrData2);
1212	});
1213	opts.cssFirst.top = 0;
1214	var cssFirstO = ntb_anims.isrtl ? opts.cssFirst.right = 0 : opts.cssFirst.left = 0;
1215	cssFirstO;
1216	opts.cssBefore.width = 0;
1217	opts.cssBefore.height = 0;
1218};
1219		
1220        break;
1221    case 'shuffle':
1222
1223$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
1224	$slides.css(ntb_anims.rtl , "0px");
1225	var i, w = $cont.css('overflow', 'visible').width();
1226	$slides.css({left: 0, top: 0});
1227	opts.before.push(function(curr,next,opts) {
1228		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
1229	});
1230	// only adjust speed once!
1231	if (!opts.speedAdjusted) {
1232		opts.speed = opts.speed / 2; // shuffle has 2 transitions
1233		opts.speedAdjusted = true;
1234	}
1235	opts.random = 0;
1236	opts.shuffle = opts.shuffle || {left:0, top:15};
1237	opts.els = [];
1238	for (i=0; i < $slides.length; i++)
1239		opts.els.push($slides[i]);
1240
1241	for (i=0; i < opts.currSlide; i++)
1242		opts.els.push(opts.els.shift());
1243
1244	// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
1245	opts.fxFn = function(curr, next, opts, cb, fwd) {
1246		if (opts.rev)
1247			fwd = !fwd;
1248		var $el = fwd ? $(curr) : $(next);
1249		$(next).css(opts.cssBefore);
1250		var count = opts.slideCount;
1251		$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
1252			var hops = $.fn.cycle.hopsFromLast(opts, fwd);
1253			for (var k=0; k < hops; k++) {
1254				if (fwd)
1255					opts.els.push(opts.els.shift());
1256				else
1257					opts.els.unshift(opts.els.pop());
1258			}
1259			if (fwd) {
1260				for (var i=0, len=opts.els.length; i < len; i++)
1261					$(opts.els[i]).css('z-index', len-i+count);
1262			}
1263			else {
1264				var z = $(curr).css('z-index');
1265				$el.css('z-index', parseInt(z,10)+1+count);
1266			}
1267			$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
1268				$(fwd ? this : curr).hide();
1269				if (cb) cb();
1270			});
1271		});
1272	};
1273	$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
1274};
1275
1276        break;
1277    case 'toss':
1278
1279$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
1280	$slides.css(ntb_anims.rtl , "0px");
1281	var w = $cont.css('overflow','visible').width();
1282	var h = $cont.height();
1283	opts.before.push(function(curr, next, opts) {
1284		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
1285		// provide default toss settings if animOut not provided
1286		if (!opts.animOut.left && !opts.animOut.top)
1287			$.extend(opts.animOut, { left: 0, top: 0, opacity: 0 });
1288		else
1289			opts.animOut.opacity = 0;
1290	});
1291	opts.cssBefore.left = 0;
1292	opts.cssBefore.top = 0;
1293	opts.animIn.left = 0;
1294};
1295		
1296        break;
1297    case 'blindZ':
1298
1299$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
1300	$slides.css(ntb_anims.rtl , "0px");
1301	var h = $cont.css('overflow','hidden').height();
1302	var w = $cont.width();
1303	opts.before.push(function(curr, next, opts) {
1304		$.fn.cycle.commonReset(curr,next,opts);
1305		opts.animIn.height = next.cycleH;
1306		opts.animOut.top   = curr.cycleH;
1307	});
1308	
1309		var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = w : opts.cssBefore.left = w;
1310		var animInO = ntb_anims.isrtl ? opts.animIn.right = 0 : opts.animIn.left = 0;
1311		var animOutO = ntb_anims.isrtl ? opts.animOut.right = w : opts.animOut.left = w;
1312	
1313	opts.cssBefore.top = h;
1314	cssBeforeO;
1315	opts.animIn.top = 0;
1316	animInO;
1317	opts.animOut.top = h;
1318	animOutO;
1319};
1320	
1321        break;
1322    case 'uncover':
1323
1324$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
1325	$slides.css(ntb_anims.rtl , "0px");
1326	var w = $cont.css('z-index','1').width();
1327	var h = $cont.height();
1328	opts.before.push(function(curr, next, opts) {
1329		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
1330		    var animOutO = ntb_anims.isrtl ? opts.animOut.right = -w : opts.animOut.left = -w;
1331			animOutO;
1332	});
1333	
1334		var animInO = ntb_anims.isrtl ? opts.animIn.right = 0 : opts.animIn.left = 0;
1335	    var cssBeforeO = ntb_anims.isrtl ? opts.cssBefore.right = 0 : opts.cssBefore.left = 0;
1336	
1337	opts.animIn.top = 0;
1338	opts.cssBefore.top = 0;
1339	animInO;
1340	cssBeforeO;
1341};
1342	
1343        break;
1344    case 'simple':
1345
1346$.fn.cycle.transitions.simple = function($cont, $slides, opts) {
1347	$slides.css(ntb_anims.rtl , "0px");
1348	opts.fxFn = function(curr,next,opts,after){
1349		$(next).show();
1350		$(curr).hide();
1351		after();
1352	};
1353};
1354
1355        break;
1356    case 'typing_2':
1357
1358$.fn.cycle.transitions.typing_2 = function($cont, $slides, opts) {
1359	$slides.css(ntb_anims.rtl , "0px");
1360	opts.before.push(function(curr, next, opts) {
1361		$(opts.elements).not(curr).hide();
1362		$.fn.cycle.commonReset(curr,next,opts,false,true);
1363		opts.animIn.width = next.cycleW;
1364	});
1365	opts.cssBefore.top = 0;
1366	opts.cssBefore.width = 0;
1367	opts.animIn.width = 'show';
1368};
1369
1370        break;
1371    default:
1372
1373$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
1374	$slides.css(ntb_anims.rtl , "0px");
1375	opts.before.push(function(curr, next, opts) {
1376		$(opts.elements).not(curr).hide();
1377		$.fn.cycle.commonReset(curr,next,opts,true,false);
1378		opts.animIn.height = next.cycleH;
1379	});
1380	opts.cssBefore.left = 0;
1381	opts.cssBefore.top = 0;
1382	opts.cssBefore.height = 0;
1383	opts.animIn.height = 'show';
1384	opts.animOut.height = 0;
1385};
1386
1387}
1388
1389})(jQuery);
1390
1391(function($) {
1392
1393	if (ntb_anims.animation == 'typing_2') {
1394	var sPlus = 4000; 
1395	var tPlus = 2000;
1396	} else {
1397	var sPlus = 0;
1398	var tPlus = 0;
1399	}
1400	
1401	 if (ntb_anims.is_ntb_rtl) { 
1402	 var nextt = '#prev-button-ntb';
1403     var prevv = '#next-button-ntb';
1404	 } else { 
1405	 var nextt = '#next-button-ntb';
1406     var prevv = '#prev-button-ntb';
1407	 }
1408	
1409	var timeoutt = ntb_anims.autostart_animtwo ? 0 : ntb_anims.timeout_anms_two;
1410	
1411    var arrData = {
1412	 speed: Number(ntb_anims.speed_anms_two) + Number(sPlus),
1413	 timeout: Number(timeoutt) + Number(tPlus),
1414	 height: '100%',		 
1415	 fx: ntb_anims.animation,
1416	 pause: ntb_anims.pause_anms_two ? 1 : 0,
1417     containerResize: true,
1418	 next: nextt,
1419     prev: prevv,
1420     fit: 1,   
1421	 width: '100%'
1422    };
1423	
1424		if(ntb_anims.anim_two__if != true) {
1425		arrData.sync = 0; // add to arrData array
1426		}
1427	
1428	$('#ntbne_five').cycle(arrData);
1429
1430})(jQuery);
1431
1432}
1433
1434(function($) {
1435$(document).ready(NTBresizefunAll);
1436$(window).on('resize',NTBresizefunAll);
1437function NTBresizefunAll() {
1438//var ht = $('#ntb--title,.n_t_ntb_b-name').height();	
1439
1440if (ntb_anims.enable_style_mobile == 1) {
1441if( window.innerWidth < ntb_anims.screen_min_width ) {
1442	    $(".news-ticker-ntb #ticker p").css({"line-height": ntb_anims.line_height_mobile - ntb_anims.bor_ticker + "px"});
1443		$(".ticker-swipe,#ticker").css({"height": ntb_anims.height_mobile - ntb_anims.bor__ + "px", "line-height": ntb_anims.line_height_mobile - ntb_anims.bor_ticker + "px"});
1444		$("#ntbne_five li,#ntbne_five").css({"height": ntb_anims.height_mobile - ntb_anims.bor_ + "px", "line-height": ntb_anims.line_height_mobile - ntb_anims.bor_li + "px"});
1445		$("#scroll-ntb").css({"height": ntb_anims.height_mobile - ntb_anims.bor_ + "px", "line-height": ntb_anims.line_height_mobile - ntb_anims.bor_scroll + "px"});
1446		$("#next-button-ntb,#prev-button-ntb").css({"line-height": ntb_anims.line_height_mobile - ntb_anims.bor__pn + "px"});
1447} else {
1448	    $(".news-ticker-ntb #ticker p").css({"line-height": ntb_anims.line_height - ntb_anims.bor_ticker + "px"});
1449		$(".ticker-swipe,#ticker").css({"height": ntb_anims.height - ntb_anims.bor__ + "px", "line-height": ntb_anims.line_height - ntb_anims.bor_ticker + "px"});
1450		$("#ntbne_five li,#ntbne_five").css({"height": ntb_anims.height - ntb_anims.bor_ + "px", "line-height": ntb_anims.line_height - ntb_anims.bor_li + "px"});
1451		$("#scroll-ntb").css({"height": ntb_anims.height - ntb_anims.bor_ + "px", "line-height": ntb_anims.line_height - ntb_anims.bor_scroll + "px"});
1452		//$("#ntb--title,.n_t_ntb_b-name").css({"line-height": ht + "px"});
1453		$("#next-button-ntb,#prev-button-ntb").css({"line-height": ntb_anims.height - ntb_anims.bor__pn + "px"});
1454}
1455} else {
1456	    $(".news-ticker-ntb #ticker p").css({"line-height": ntb_anims.line_height - ntb_anims.bor_ticker + "px"});
1457		$(".ticker-swipe,#ticker").css({"height": ntb_anims.height - ntb_anims.bor__ + "px", "line-height": ntb_anims.line_height - ntb_anims.bor_ticker + "px"});
1458		$("#ntbne_five li,#ntbne_five").css({"height": ntb_anims.height - ntb_anims.bor_ + "px", "line-height": ntb_anims.line_height - ntb_anims.bor_li + "px"});
1459		$("#scroll-ntb").css({"height": ntb_anims.height - ntb_anims.bor_ + "px", "line-height": ntb_anims.line_height - ntb_anims.bor_scroll + "px"});
1460		//$("#ntb--title,.n_t_ntb_b-name").css({"line-height": ht + "px"});
1461		$("#next-button-ntb,#prev-button-ntb").css({"line-height": ntb_anims.height - ntb_anims.bor__pn + "px"});
1462}
1463
1464}
1465
1466	$("#ntbne_five, #ticker p").css({"display": "block"});
1467	$(".ticker-swipe span").css({"display": "none"});
1468
1469/*	
1470    $(window).resize(function() {
1471    });
1472    $(window).trigger('resize');
1473	//$("#ntbne_five").css({"display": "block"});
1474*/	
1475})(jQuery);
1476
1477    if (ntb_anims.top_600) {
1478   (function($) {
1479   $(window).scroll(function () {
1480   var height = $('#wpadminbar').outerHeight();
1481   
1482    if($(this).scrollTop() > height){
1483        $('.n_t_ntb_b, .news-ticker-ntb').addClass('fixed_news_ticker_600_ntb');    
1484    }else{
1485        $('.n_t_ntb_b, .news-ticker-ntb').removeClass('fixed_news_ticker_600_ntb');
1486    }
1487		
1488    });
1489    })(jQuery);		
1490	}
1491	
1492	if (ntb_anims.arr_s_script) {
1493	console.log(eval(ntb_anims.s_script));
1494	}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.