PageSourceSearch

https://www.news.conduent.com/media/themes/677850d93d6332b53c25f251/js/common.js?ver=2026-07-24

js conduent.com collected 2026-09-24 09:02:59 UTC 7,816 bytes, 262 lines download raw bytes

1(function($){
2
3  //
4  // TABS OPEN
5  //
6  if($(".socialTab").length) {
7    var tabs = $(".socialTab");
8    tabs.find(".socialTab-tabs").find("a").click(function(){
9      $(this).parent("li").siblings().removeClass("active");
10      $(this).parent("li").addClass("active");
11      var addr = $(this).attr("href");
12      $(addr).siblings().removeClass("active");
13      $(addr).addClass("active");
14      return false;    
15    });
16  }
17
18
19  /* Article Share fix position */
20  if($(".article-share").length) {
21      var share = $(".article-share");
22      var pos = share.offset().top;
23      var content = $(".content-breadcrumbs").outerHeight() + $(".content-title").outerHeight() + $(".article-hero").outerHeight();
24      $(window).scroll(function(e) {
25        if ($(window).scrollTop() > content) { 
26          share.addClass("fix");
27          if($(window).scrollTop() > $("#footer").offset().top - $("#footer").height() - share.height()) {
28            share.addClass("fixFooter");
29          } else {
30            share.removeClass("fixFooter");
31          }
32        } else {
33          share.removeClass("fix");
34        }
35      });
36  }  
37
38  
39  //
40  //  EMBED SOCIAL LINKS
41  //
42  // social feed embedly
43  /* var key = '465328b939e7471b88ffb33c9ba9f418'; 
44  var embedURL = [];
45  $('a.social-embed').each(function(){
46    embedURL.push($(this).attr("href"));
47  });
48	
49  $.getJSON('https://api.embedly.com/1/oembed?urls='+embedURL.join(",")+"&"+$.param({key: key, width: '200'}),function(oembedAll){
50    for(i in oembedAll) {
51      var oembed = oembedAll[i];
52      var $item = $('<div class="embed"></div>');
53      if (oembed.type === 'video' || oembed.type === 'rich') {
54          // Makes the video responsive.
55          $resp = $('<div class="resp-media"></div>');          
56          var oembed_html = oembed.html;
57          oembed_html = oembed_html.replace(/(class="fb-post")/gi,'$1 data-width=auto');
58        
59          // Add it to and item.
60          $resp.html(oembed_html);
61          $item.append($resp);
62      } else if (oembed.type === 'photo') { // Images
63          $item.html('<img src="' + oembed.url + '"/>');
64      } else if (oembed.type === 'link') {
65          $item.html([
66            '<img src="' + oembed.thumbnail_url + '"/>',
67            '<h4>' + oembed.title + '</h4>',
68            '<p>' + oembed.description + '</p>'
69          ].join(''));
70      } else {
71          // error case.
72          return false;
73      }
74      $("[data-provider="+oembed.provider_name+"] a.social-embed:first").after($item);
75      $("[data-provider="+oembed.provider_name+"] a.social-embed:first").remove();
76    }  
77   
78  });
79	
80	$('a.social-embed-linkedin').embedly({
81    key: '465328b939e7471b88ffb33c9ba9f418',
82    query: {maxwidth:262} 
83	}); */
84  
85  //
86  //  CAROUSEL SLIDER
87  //
88  if($(".carousel-thmbs-wrapper").length) {
89    var slider = $(".carousel-thmbs-wrapper").bxSlider(sliderOpt());
90    $(window).resize(function(){
91      if(slider) {
92        slider.reloadSlider(sliderOpt());
93      }
94    });
95  }
96  
97  $(".carousel-thmbs").on("click",".carousel-thmbs-item",function(){
98    slider.stopAuto();
99    slider.goToSlide(parseInt($(this).attr("data-slide"))-1);
100    setInterval(function(){
101      slider.startAuto();
102    },200);
103  });
104  $(".carousel-sel-control-prev").click(function(){
105    var s = parseInt($(".carousel-thmbs").find(".carousel-thmbs-item-active").attr("data-slide"))-1,
106        l = $(".carousel-thmbs-item:not(.bx-clone)",".carousel-thmbs").length;
107    if(s==0) s = l;
108    slider.goToSlide(s-1);
109  });
110  $(".carousel-sel-control-next").click(function(){
111    var s = parseInt($(".carousel-thmbs").find(".carousel-thmbs-item-active").attr("data-slide"))-1,
112         l = $(".carousel-thmbs-item:not(.bx-clone)",".carousel-thmbs").length;
113    if(s+1==l) s = -1;
114    slider.goToSlide(s+1);
115  });
116
117  function sliderOpt() {
118    var nw = $(window).width();
119    var opt = {
120      auto: true,
121      pager: false,
122      controls: false,
123      minSlides: 4,
124      maxSlides: 4,
125      moveSlides: 1,
126      pause: 8000,
127      speed: 500,
128      slideWidth: 600,
129      onSlideBefore: function(slide, oldIndex, newIndex){
130        $(".carousel-thmbs-item",".carousel-thmbs").removeClass("carousel-thmbs-item-active");
131        slide.addClass("carousel-thmbs-item-active");
132
133        /*
134        $(".carousel-sel-item").css("opacity",0);
135        */
136        setTimeout(function(){
137          $(".carousel-sel-item",".carousel-sel").removeClass("carousel-sel-item-active");
138        },200)
139      },
140      onSlideAfter: function(slide, oldIndex, newIndex){
141        $("#"+slide.attr("data-href")+".carousel-sel-item",".carousel-sel").addClass("carousel-sel-item-active");
142        //$(".carousel-sel-item").css("opacity",1);
143      }
144    };
145    
146    if(nw >= 768) {
147      sopt = {
148        mode: 'vertical'
149      };
150    } else {
151      sopt = {
152        mode: 'horizontal',
153        pager: false,
154        controls: true
155      };
156    }
157    return $.extend(opt,sopt);
158  }
159   
160  //
161  //  TWITTER FECTHER
162  //
163  var config1 = {
164             
165      "profile": {"screenName": 'conduent'}, 
166      "maxTweets": 3,
167      "enableLinks": true,
168      "showUser": true,
169      "showTime": true,
170      "showPermalinks": true,
171      "showImages": true,
172      "showRetweet": false,
173      "showInteraction": true,
174      "linksInNewWindow": true,
175      "customCallback": function(tweets) {
176        var x = tweets.length;
177        var n = 0;
178        var html = '';
179        var element = document.getElementById('twitterFeed');
180        while(n < x) {
181          html += '<div class="twitterFeed-content-item">' + tweets[n] + '</div>';
182          n++;
183        }
184        element.innerHTML = "<div class='twitterFeed-content'>" + html + "</div>";
185        $("#twitterFeed .user img").each(function(){
186          $(this).attr("src",$(this).attr("data-src-1x"));
187        });
188      }
189  }
190  if($("#twitterFeed").length) {  
191    twitterFetcher.fetch(config1);
192  }
193  
194  
195  // Find all YouTube videos
196	var $allVideos = $("iframe[src^='//www.youtube.com'], .embed_frame"),
197
198	    // The element that is fluid width
199	    $fluidEl = $(".content-body");
200
201	// Figure out and save aspect ratio for each video
202	$allVideos.each(function() {
203
204		$(this)
205			.data('aspectRatio', this.height / this.width)
206			
207			// and remove the hard coded width/height
208			.removeAttr('height')
209			.removeAttr('width');
210
211	});
212
213	// When the window is resized
214	// (You'll probably want to debounce this)
215	$(window).resize(function() {
216
217		var newWidth = $fluidEl.width();
218		
219		// Resize all videos according to their own aspect ratio
220		$allVideos.each(function() {
221
222			var $el = $(this);
223			$el
224				.width(newWidth)
225				.height(newWidth * $el.data('aspectRatio'));
226
227		});
228
229	// Kick off one resize to fix all videos on page load
230	}).resize(); 
231   
232  $("#emailAlertsForm").on("submit",function(){
233    submitForm();
234    return false;
235  })
236  
237})(jQuery)
238
239function submitForm(){
240  // AD-2977: /alerts requires a CSRF token; fetch a fresh one at submit time
241  // (tokens are session-bound and cannot be embedded in Varnish-cached pages)
242  $.get("/alerts").always(function(res){
243    var html = (typeof res === "string") ? res : ((res && res.responseText) || "");
244    var m = html.match(/name="_csrf_token"\s+value="([a-f0-9]+)"/);
245    var data = $("#emailAlertsForm").serialize();
246    if(m) data += "&_csrf_token=" + m[1];
247    $.ajax({
248      method: "post",
249      data: data,
250      url: $("#emailAlertsForm").attr("action"),
251      complete: function(response){
252        if(response.responseText.indexOf("errors")==-1) {
253          $(".errors","#emailForm_wrapper").hide();
254          $("#emailAlerts_error").text("");
255          $("#emailAlertsForm").addClass("sent");
256        } else {
257          $("#emailAlerts_error").text("Sorry, something went wrong. Please try again in a moment.");
258        }
259      }
260    });
261  });
262}

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.