1var shareHandlerURL; 2 3$(function(){ 4 5 /*New Js for hiding disqus_thread added by Sunit Manchekar @ 18 May 2016*/ 6 if ($('#disqus_thread').length){ 7 //alert(0) 8 $('#disqus_thread').parents('.commentsBox').remove(); 9 $('#disqus_thread').parents('.commentBox').remove(); 10 $('#disqus_thread').parents('.popUp-Column2').remove(); 11 /*$('#disqus_thread').parents('#thirdContainer').remove();*/ 12 } 13 /*Below Code is for Removing Airtel, Axis bank logo etc...*/ 14 $('.logoMaster li').eq(0).hide(); 15 $('.logoMaster li').eq(2).hide(); 16 /*New Js for hiding disqus_thread added by Sunit Manchekar @ 18 May 2016 ---- End*/ 17}); 18 19/** function for email starts **/ 20function emailFormatter(senderId,mailDomain,subject) 21{ 22 if(subject!=null) 23 { 24 subject=escape(subject); 25 document.write("<a href=mailto:" + senderId + "@" + mailDomain + "?subject=" + subject + " class='emailAddress'>" + senderId + "@" + mailDomain + "</a>"); 26 } 27 else 28 { 29 document.write('<a href="mailto:' + senderId + '@' + mailDomain + '" class="emailAddress">' + senderId + '@' + mailDomain + '</a>'); 30 } 31} 32/** function for email ends **/ 33 34function searchdatas2() { 35 var txt = $("input[name='Search']").val(); 36 37 if (txt.length > 0 && txt.toUpperCase() != "SEARCH") { 38 39 document.forms["form1"].action = "/search2.aspx?q=" + txt; 40 document.forms["form1"].submit(); 41 } 42} 43 44function searchdata() { 45 var txt = $("input[name='Search']").val(); 46 47 if (txt.length > 0 && txt.toUpperCase() != "SEARCH") { 48 49 document.forms["form1"].action = "/Search.aspx?q=" + txt; 50 document.forms["form1"].submit(); 51 } 52} 53function myFocus(element) { 54 if (element.value == element.defaultValue) { 55 element.value = ''; 56 } 57} 58 59function myBlur(element) { 60 if (element.value == '') { 61 element.value = element.defaultValue; 62 } 63} 64 65 66 67/** Disqus Functionality starts **/ 68function comments(param1, param2, param3) { 69 70 // if (String(window.location).toLowerCase().indexOf("satyamevjayate") > -1) { param1 = 'satyamevjayatesite'; } 71 72 var loc = String(window.location).toLowerCase(); 73 if (loc.indexOf("satyamevjayate") > -1) { 74 if (!(loc.indexOf("staging") > -1) && !(loc.indexOf("noncdn") > -1)) { 75 param1 = 'satyamevjayatesite'; 76 } 77 } 78 79 if(/msie 7.0/i.test(navigator.userAgent.toLowerCase())==false) 80 { 81 setTimeout(function(){ 82 disqus_shortname = param1; // required: replace example with your forum shortname 83 disqus_identifier = param2; 84 /* * * DON'T EDIT BELOW THIS LINE * * */ 85 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; 86 dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; 87 if(param3) 88 { 89 $.when($(".popUp").find("#disqus_thread").append(dsq)).then(function(){ 90 if($(window).width()>959) 91 { 92 $("."+param3).find(".discuss").jScrollPane({autoReinitialise: true}); 93 } 94 }); 95 } 96 else 97 { 98 $("#disqus_thread").append(dsq); 99 } 100 },500) 101 } 102} 103/** Disqus Functionality ends **/ 104var relatedVideoListThumbWidth, disqus_shortname, disqus_identifier; 105 106$(window).load(function(){ 107 //relatedVideoListThumbWidth=$(".gallery-carousel .related-video-list ul li").eq(1).outerWidth(true); 108 //$(".gallery-carousel .related-video-list ul").css("width",$(".gallery-carousel .related-video-list ul li").length*relatedVideoListThumbWidth+"px"); 109}); 110 111 112function isPropertySupported(property) 113{ 114 return property in document.head.style; 115} 116 117var isiPhone = /iphone/i.test(navigator.userAgent.toLowerCase()); 118var isiPad = /ipad/i.test(navigator.userAgent.toLowerCase()); 119var isAndroid = /android/i.test(navigator.userAgent.toLowerCase()); 120var isWindowsPhone = /windows phone/i.test(navigator.userAgent.toLowerCase()); 121var paramIframe; 122var isMozilla = /mozilla/i.test(navigator.userAgent.toLowerCase()); 123 124var episodeNavWidth=0; 125var navTimeout; 126function episodeNavInit(){ 127 $('.episodicMaster .next, .episodicMaster .next').unbind("click") 128 $(".episodeNav").removeAttr("style") 129 episodeNavWidth = 0; 130 $(".episodeNav li").each(function(){ 131 episodeNavWidth += $(this).outerWidth(true); 132 }).promise().done(function(){ 133 $(".episodeNav").width(episodeNavWidth+2); 134 $(".episodeNav").css("visibility","visible"); 135 136 if($(".episodicMaster ul li.active").length){ 137 $(".episodicMaster ul li.active").addClass("slideActv"); 138 var mLeft = (parseInt($(".episodicMaster ul li.active").position().left)-18)*-1; 139 $(".episodicMaster ul").css("margin-left", mLeft+"px"); 140 141 var point1 = $(".episodeOv").offset().left+$(".episodeOv").outerWidth(true); 142 var point2 = $(".episodicMaster ul li").last().offset().left+$(".episodicMaster ul li").last().outerWidth(true); 143 var point3 = point1-point2; 144 if(point3 > 0){ 145 $(".episodicMaster ul").css("margin-left", mLeft+point3+"px"); 146 $('.episodicMaster .next').addClass("inactive"); 147 $(".episodicMaster ul li").each(function(){ 148 if($(this).offset().left+$(this).outerWidth() > $(".episodeOv").offset().left){ 149 $(this).addClass("slideActv").siblings().removeClass("slideActv"); 150 return false; 151 } 152 }); 153 } 154 if($(".episodicMaster ul li.active").index() == 0) {$(".episodicMaster .prev").addClass("inactive")} 155 else if($(".episodicMaster ul li.active").index() == $(".episodicMaster ul li").length-1) {$(".episodicMaster .next").addClass("inactive")} 156 } 157 else{ 158 $(".episodicMaster ul li").eq(0).addClass("slideActv"); 159 $(".episodicMaster .prev").addClass("inactive") 160 } 161 162 $('.episodicMaster .next').bind('click', function () { 163 if (!$(this).parent('.episodicMaster').find('ul').is(":animated") && !$(this).hasClass("inactive")) { 164 $('.episodicMaster .prev').removeClass("inactive") 165 var $slideActv = $(this).parents('.episodicMaster').find('.slideActv'); 166 var ulWidth = episodeNavWidth; 167 var visibleWidth = $('.episodeOv').outerWidth(); 168 var ulMarginLeft = Math.abs(parseInt($('.episodicMaster ul').css('margin-left'))); // ul margin left 169 var actvWidth = ($('.episodicMaster ul li.slideActv').outerWidth(true)+2); // Active li width 170 var overflowWidth = 0; 171 overflowWidth = ulWidth - visibleWidth - ulMarginLeft; 172 //alert(ulWidth +" "+ visibleWidth +" "+ ulMarginLeft) 173 if (overflowWidth >= actvWidth) { 174 $('.episodicMaster ul').animate({ marginLeft: "+=-" + actvWidth }, 300, function () { 175 $slideActv.next().addClass('slideActv').siblings().removeClass('slideActv'); 176 }); 177 } 178 else { 179 $('.episodicMaster ul').animate({ marginLeft: "+=-" + (overflowWidth) }, 300, function () { 180 $slideActv.next().addClass('slideActv').siblings().removeClass('slideActv'); 181 }); 182 $(this).addClass("inactive") 183 } 184 185 186 187 } 188 });
189 190 $(".reachpage .readmore").click(function(){ 191 if($(".moretext").is(":visible")){ 192 $(".moretext").slideUp(); 193 $(this).text("Read more") 194 }else{ 195 $(".moretext").slideDown(); 196 $(this).text("View Less") 197 } 198 }); 199 200 $('.episodicMaster .prev').bind('click', function () { 201 if (!$(this).parent('.episodicMaster').find('ul').is(":animated") && !$(this).hasClass("inactive")) { 202 $('.episodicMaster .next').removeClass("inactive") 203 var $slideActv = $(this).parents('.episodicMaster').find('.slideActv'); 204 var margLeft = ($slideActv.prev().outerWidth(true)) * -1; 205 var ulMargLeft = Math.abs(parseInt($('.episodicMaster ul').css('margin-left'))); 206 207 if ($('.episodicMaster li').eq(1).hasClass('slideActv')) { 208 $('.episodicMaster .prev').addClass("inactive") 209 $('.episodicMaster ul').animate({ marginLeft: '0px' }, 300); 210 } 211 else { 212 $('.episodicMaster ul').animate({ marginLeft: '-=' + margLeft }, 300); 213 } 214 215 $slideActv.prev().addClass('slideActv').siblings().removeClass('slideActv'); 216 } 217 }); 218 219 /* Episode Navigation - End */ 220 221 }); 222} 223 224function promoSlide(){ 225 if($("body").hasClass("cssTransition")){ 226 if(!$("body").hasClass("cube")){ 227 228 $("body").addClass("perspective cube ovStatus"); 229 $("#season2").height($(document).height()) 230 $(".promoArrow").css("top", $(window).height()/2).fadeIn(); 231 $(".overlay").fadeIn(); 232 setTimeout(function(){$("#season2").css("position","absolute")},1000); 233 $(".overlay").one("click", function(){ 234 $(".promoArrow").click() 235 }); 236 } 237 else{ 238 $("body").removeClass("cube ovStatus") 239 $("#season2").css("position","fixed") 240 $(".promoArrow").fadeOut() 241 setTimeout(function(){$("body").removeClass("perspective");},1000); 242 $(".overlay").fadeOut(); 243 } 244 } 245 246 if($("body").hasClass("nonCssTransition")){ 247 if(!$("body").hasClass("iCube")){ 248 $("body").addClass("iCube ovStatus"); 249 //$(".wrapper").css("position","fixed"); 250 $(".headerMaster").css("position","relative"); 251 $(".section1").css({"padding-top":0,"margin-top":"-10px"}); 252 if($(window).width() > 540){ 253 var b = -540 254 } 255 else{ 256 var b = -$(window).width(); 257 } 258 $("#season2").css({"margin-left":(b*-1)+"px"}).animate({marginLeft:b+"px"},800); 259 $(".wrapper").css("display","block").animate({marginLeft:b+"px"},800); 260 $(".promoArrow").css({"top": $(window).height()/2, "left":0}).fadeIn(); 261 //$(".overlay").css({"margin-left":(b*-1)+"px"}).animate({marginLeft:b+"px"},800).show(); 262 $(".overlay").show(); 263 $(".overlay").one("click", function(){ 264 $(".promoArrow").click() 265 }); 266 } 267 else{ 268 $("body").removeClass("iCube ovStatus"); 269 $(".headerMaster, .section1").removeAttr("style") 270 $(".wrapper").animate({marginLeft:0},800); 271 $("#season2").css("display","block").animate({marginLeft:0},800); 272 $(".promoArrow").fadeOut() 273 $(".overlay").hide(); 274 275 } 276 } 277 278 if($("body").hasClass("deviceArrow")){ 279 if(!$("body").hasClass("iCube")){ 280 $("body").addClass("iCube ovStatus"); 281 //$(".wrapper").css("position","fixed"); 282 $(".headerMaster").css("position","relative"); 283 $(".section1").css({"padding-top":0,"margin-top":"-10px"}); 284 if($(window).width() > 540){ 285 $("#season2").width(540); 286 var b = -540 287 } 288 else{ 289 var b = -$(window).width(); 290 } 291 $("#season2").css({"margin-left":(b*-1)+"px"}).animate({marginLeft:b+"px"},800); 292 $(".wrapper").css("display","block").animate({marginLeft:b+"px"},800); 293 294 $(".promoArrow").css("top", $("#season2 h2").offset().top-75).fadeIn(); 295 $(".overlay").show(); 296 } 297 else{ 298 $("body").removeClass("iCube ovStatus"); 299 300 $(".wrapper").css("position","relative") 301 $(".headerMaster, .section1").removeAttr("style") 302 $(".wrapper").animate({marginLeft:0},800); 303 $("#season2").css("display","block").animate({marginLeft:0},800); 304 $(".promoArrow").fadeOut() 305 $(".overlay").hide(); 306 307 } 308 } 309 310} 311 312function episodeSelectChange(_this){ 313 var thisVal = _this.text(); //Episode 2: Fighting Rape 2 314 alert(thisVal) 315 thisVal = thisVal.split(":"); 316 _this.parents(".selectBox").find(".selectedValue").html("<span>"+thisVal[0]+":</span> "+thisVal[1]); 317}; 318 319/** For opening a Twitter Pledge **/ 320function openTwitterPledgePopup() 321{ 322 var sectionWidth = $('.section1').width(); 323 var voteChangeWid = $('.voteForChange').width(); 324 var twitterCenter = (sectionWidth-voteChangeWid)/2; 325 $(".overlay").show(); 326 $(".voteForChange").css({"top":($(window).height()-$(".voteForChange").height())/2,"left":twitterCenter}); 327 $(".voteForChange").show(); 328} 329/** For opening a Twitter Pledge ends **/ 330 331 332var windowLocation, NGO_URL, NGO_Name, NGO_Flag; 333$(function () { 334 /*Hiding disqus_thread Start*/ 335 $('#disqus_thread').hide(); 336 337 /*Hiding disqus_thread Ends*/ 338 if($(".impactBox .container").length) 339 { 340 $(".impactBox,.scrollLinksImpact").show(); 341 } 342 343 if ($(".lightboxDisclaimerPopUp").length) {
344 var varLightboxDisclaimerPopUp = "<span class='popUp-close fr'> </span><h4>Attention Users:</h4><h5>This is the official website of Satyamev Jayate. Please beware of other websites which try to mislead or defraud you.</h5><p>It has been brought to our notice that false and malicious messages are circulating across social media claiming that a missed call to the number 18001032305 will lead to recharge of mobile talk time or will act as a support for a particular political party. We would like to categorically deny this. The number as advertised on Star Plus is only meant for a to pledge to support to our cause for the 2014 Lok Sabha elections, urging viewers not to vote for criminals. Viewers are advised to use their discretion if any other message reaches them on social media. Star India & Satyamev Jayate are not liable or responsible in any manner whatsoever for inappropriate, improper or fraudulent use and practices of the above number etc.</p>"; 345 $(".lightboxDisclaimerPopUp").html(varLightboxDisclaimerPopUp); 346 } 347 348 var NGO_Arr = [[], ["Jan Sahas Social Development Society|yesNRI|http://www.jansahasindia.org/donate.php", "Anusandhan Trust|yesNRI|http://cehat.org"], ["Himveer Wives' Welfare Association"], ["Kashtakari Panchayat", "Stree Mukti Sanghatana|yesNRI|http://streemuktisanghatana.org/donate/"], ["Society for Rural, Urban and Tribal Initiative (SRUTI)|yesNRI|http://www.sruti.org.in/?q=extend-solidarity/donate"], ["The Concerned for Working Children|yesNRI|http://www.concernedforworkingchildren.org/about/support-us/", "Resource and Support Centre for Development|yesNRI|http://mahilarajindia.org/?page_id=685"]]; 349 $(".selectEpisode select").change(function () { 350 $(".selectNGO .selectedValue").text("Select NGO"); 351 if ($(this).children("option:selected").attr("value") != 0) { 352 var selectedNGOVal = $(this).children("option:selected").attr("value"); 353 var createSelect = "<option value='0'>Select NGO</option>"; 354 for (i = 0; i < NGO_Arr[[selectedNGOVal]].length; i++) { 355 if (NGO_Arr[selectedNGOVal][i].indexOf("|") != -1) { 356 NGO_Name = NGO_Arr[selectedNGOVal][i].substr(0, NGO_Arr[selectedNGOVal][i].indexOf("|")); 357 NGO_URL = NGO_Arr[selectedNGOVal][i].substr(NGO_Arr[selectedNGOVal][i].lastIndexOf("|") + 1); 358 NGO_Flag = NGO_Arr[selectedNGOVal][i].substr(NGO_Arr[selectedNGOVal][i].indexOf("|") + 1, 6); 359 createSelect += "<option value=" + NGO_URL + " id=" + NGO_Flag + ">" + NGO_Name + "</option>"; 360 } 361 else { 362 createSelect += "<option>" + NGO_Arr[selectedNGOVal][i] + "</option>"; 363 } 364 } 365 $(".selectNGO select").html(createSelect); 366 } 367 }); 368 369 $(".radiobox input:radio").click("change", function () { 370 if ($(this).closest(".donatelist") && $(".selectEpisode select").children("option:selected").attr("value") != 0 && $(".selectNGO select").children("option:selected").attr("value") != 0) { 371 $(".donate_cta a").attr("href", "javascript:;"); 372 if ($(this).is(":checked")) { 373 if ($(this).attr("id") == "in") { 374 $(".donate_cta a").attr("href", "http://www.axisbank.com/Satyamev-Jayate/index.html"); 375 $(".donate_cta a").attr("target", "_blank"); 376 $(".ngo-not-available").hide(); 377 } 378 else if ($(this).attr("id") == "nri") { 379 if ($(".selectNGO select").children("option:selected").attr("id") == "yesNRI") { 380 $(".donate_cta a").attr("href", $(".selectNGO select").children("option:selected").attr("value")); 381 $(".donate_cta a").attr("target", "_blank"); 382 $(".ngo-not-available").hide(); 383 } 384 else { 385 $(".ngo-not-available").hide(); 386 if ($(".selectNGO select").children("option:selected").text().indexOf("Kashtakari") != -1) { 387 $(".ngo-Kashtakari").show(); 388 $(".donate_cta a").removeAttr("target"); 389 } 390 else if ($(".selectNGO select").children("option:selected").text().indexOf("Himveer") != -1) { 391 $(".ngo-himveer").show(); 392 $(".donate_cta a").removeAttr("target"); 393 } 394 } 395 } 396 } 397 } 398 $(this).parent().addClass("checked").parents(".radioBoxMaster").siblings().find(".radiobox").removeClass("checked"); 399 });
400 401 windowLocation = window.location.href; 402 403 if ($("#hdnhqid").length) { 404 if ($("#hdnhqid").val() == "fighting-rape") { 405 $(".missCallNo span").text("1800 - 103 - 2301"); 406 $(".sms span").text("5782701"); 407 $(".missCallNo").css("margin-top", "50px"); 408 $("#aamirAsks .askMaster .details p").text("The cost of sending this SMS is Rs 5, your contribution will be accounted towards the NGO(s) Anusandhan Trust and Jan Sahas Social Development Society featuring in this Episode after deduction of the mobile operator's share and applicable government taxes and other service charges. Presently available for Airtel, Tata Docomo, Idea Cellular, Reliance & Vodafone. You can send more than one SMS to benefit these organizations, and you can also, if you wish, help the organizations further by sending them a cheque, and deposit it in your nearest Axis Bank branch. You can also transfer your amount to them online through their website. You can get more information about depositing the cheque at any Axis Bank branch. Airtel subscribers can donate by dialing 400 from your number. Reliance Foundation will donate Rs 1 crore, which will be divided amongst these two organisations. Reliance Foundation is Satyamev Jayate's philantropy partner."); 409 } 410 else if ($("#hdnhqid").val() == "police") { 411 $(".missCallNo span").text("1800 - 103 - 2302"); 412 $(".missCallNo").css("margin-top", "50px"); 413 $(".sms, p.options").hide(); 414 } 415 else if ($("#hdnhqid").val() == "dont-waste-your-garbage") { 416 $(".missCallNo span").text("1800 - 103 - 2303"); 417 $(".sms span").text("5782703"); 418 $("#aamirAsks .askMaster .details p").text("The cost of sending this SMS is Rs 5, your contribution will be accounted towards the NGO Stree Mukti Sanghatana featuring in this episode after deduction of the mobile operator's share and applicable government taxes and other service charges. Presently available for Airtel, Tata Docomo, Idea Cellular, Reliance & Vodafone. You can send more than one SMS to benefit this organization. You can also, if you wish, help Stree Mukti Sanghatana and another NGO Kashtakari Panchayat by sending them a cheque, and deposit it in your nearest Axis Bank branch. You can also transfer your amount to them online through their website. You can get more information about depositing the cheque at any Axis Bank branch. Airtel subscribers can donate by dialing 400 from your number. Reliance Foundation will donate Rs 1 crore, which will be divided amongst these two organizations. Reliance Foundation is Satyamev Jayate's philantropy partner."); 419 } 420 else if ($("#hdnhqid").val() == "kings-every-day") { 421 $(".missCallNo span").text("1800 - 103 - 2304"); 422 $(".sms span").text("5782704"); 423 $("#aamirAsks .askMaster .details p").text("The cost of sending this SMS is Rs 5, your contribution will be accounted towards the NGO, Society for Rural Urban & Tribal Initiative (SRUTI) featuring in this episode after deduction of the mobile operator's share and applicable government taxes and other service charges. Presently available for Airtel, Tata Docomo, Idea Cellular, Reliance & Vodafone. You can send more than one SMS to benefit this organization. You can also, if you wish, help them by sending a cheque, and depositing it in your nearest Axis Bank branch. You can also transfer your amount to them online through their website. You can get more information about depositing the cheque at any Axis Bank branch. Airtel subscribers can donate by dialing 400 from your number. Reliance Foundation will donate Rs 1 crore, which will be handed over to SRUTI . Reliance Foundation is Satyamev Jayate's philantropy partner."); 424 } 425 else if ($("#hdnhqid").val() == "criminalization-of-politics") { 426 $(".missCallNo span").text("1800 - 103 - 2305"); 427 $(".sms span").text("5782705"); 428 $("#aamirAsks .askMaster .details p").text("The cost of sending this SMS is Rs 5, your contribution will be accounted towards the NGO(s) Resource and Support Centre for Development and The Concerned for Working Children featuring in this Episode after deduction of the mobile operator's share and applicable government taxes and other service charges. Presently available for Airtel, Tata Docomo, Idea Cellular, Reliance & Vodafone. You can send more than one SMS to benefit these organizations, and you can also, if you wish, help the organizations further by sending them a cheque, and deposit it in your nearest Axis Bank branch. You can also transfer your amount to them online through their website. You can get more information about depositing the cheque at any Axis Bank branch. Airtel subscribers can donate by dialing 400 from your number. Reliance Foundation will donate Rs 1 crore, which will be divided amongst these two organisations. Reliance Foundation is Satyamev Jayate's philantropy partner."); 429 } 430 } 431 432 /* Accordion Code Start */ 433 434 if ($(".accordian .scroll_pane").length && $(window).width() > 959) { 435 var pane = $(".accordian .scroll_pane") 436 pane.jScrollPane({ showArrows: true, scrollbarWidth: 3, autoReinitialise: true, animateScroll: true });
437 var api = pane.data('jsp'); 438 439 $('.yearContent li a').bind( 440 'click', 441 function () { 442 // Note, there is also scrollToX and scrollToY methods if you only 443 // want to scroll in one dimension 444 $(this).parent().addClass("active").siblings().removeClass("active"); 445 var thisText = $(this).text(); 446 var scrollElement = $(this).parents(".accordian_content").find(".newsContent .newsGroup").eq($(this).parent().index()).position().top; 447 api.scrollTo(0, scrollElement); 448 return false; 449 } 450 ); 451 452 } 453 454 /*accordian:start*/ 455 $(".accordian h3").click(function () { 456 $(this).next(".accordian .accordian_content").slideDown().siblings(".accordian .accordian_content").slideUp(); 457 $(this).addClass("active").siblings().removeClass("active"); 458 var pane = $(".accordian .scroll_pane") 459 pane.jScrollPane({ showArrows: true, scrollbarWidth: 3, autoReinitialise: true, animateScroll: true }); 460 var api = pane.data('jsp'); 461 if ($(window).width() < 959) { 462 api.destroy(); 463 } 464 }).eq(0).click(); 465 /*accordian:end*/ 466 467 468 469 /* Accordion Code End */ 470 471 /* If Petitition - Start */ 472 if (windowLocation.indexOf("?Petition=") != -1) { 473 var actAccordVal = parseInt(windowLocation.split("?Petition=")[1]); 474 $(".contentWrapMaster.actNow .tabsMaster .tabs").eq(actAccordVal).click(); 475 } 476 /* If Petitition - End */ 477 478 $(".agShare").click(function () { 479 if (!$(this).attr("style")) { 480 $(this).css({ "margin-top": "-39px" }); 481 } 482 else { 483 $(this).removeAttr("style"); 484 } 485 }); 486 487 var pagename = "/" + location.pathname.substring(location.pathname.lastIndexOf("/") + 1); 488 if ($(".topNav li a[href*='" + pagename + "']").length > 0 && $(".homeBanner").length != 1 && $(".my-airtelBanner").length != 1) { 489 $(".topNav li a[href*='" + pagename + "']").parent().addClass("active"); 490 } 491 492 if ($(".homeBanner").length == 1) { 493 $("#smj2014").addClass("current"); 494 } 495 496 /*if ((isiPhone || isAndroid || isWindowsPhone || isiPad)) 497 { 498 $('.headerMaster').css({'position':'relative'}); 499 $('.scrollLinks').css({'visibility':'hidden'}); 500 $(".telephone").each(function(){ 501 if($(this).parent().hasClass("misscall")) 502 { 503 $(this).attr("href","tel:18001032301"); 504 } 505 else if($(this).html().indexOf("1")!=-1) 506 { 507 $(this).attr("href","tel:"+$(this).html()); 508 } 509 }); 510 }*/ 511 512 if ((isiPhone || isAndroid || isWindowsPhone || isiPad)) { 513 $('.headerMaster').css({ 'position': 'relative' }); 514 $('.scrollLinks').css({ 'visibility': 'hidden' }); 515 516 var telNumber; 517 var wrapperRelAttr = $(".wrapper").attr("rel").replace(/ /gi, ""); 518 519 if (wrapperRelAttr == "Episode01") { 520 telNumber = 18001032301; 521 } 522 else if (wrapperRelAttr == "Episode02") { 523 telNumber = 18001032302; 524 } 525 else if (wrapperRelAttr == "Episode03") { 526 telNumber = 18001032303; 527 } 528 else if (wrapperRelAttr == "Episode04") { 529 telNumber = 18001032304; 530 } 531 else if (wrapperRelAttr == "Episode05") { 532 telNumber = 18001032305; 533 } 534 535 $(".telephone").each(function () { 536 if ($(this).parent().hasClass("misscall")) { 537 $(this).attr("href", "tel:" + telNumber); 538 } 539 else if ($(this).html().indexOf("1") != -1) { 540 $(this).attr("href", "tel:" + $(this).html()); 541 } 542 }); 543 } 544 545 /*** Homepage Values JSON ***/ 546 $.ajaxSetup({ cache: false }); 547 548 /*if($(".actionTaken").length) 549 { 550 $.getJSON('/json/homepage.json', function (jd) { 551 var cnt = 0; 552 var loopstart = 0; 553 loopstart = jd.data.startTotalResponses.All.totalResponses; 554 var loopend = 0; 555 loopend = jd.data.endTotalResponses.All.totalResponses; 556 var increment = 0; 557 // the count to incement for 30 seconds 558 if(parseInt((loopend - loopstart) / 3000)<=0) 559 { 560 increment=1; 561 } 562 563 var counter = setInterval(function () { 564 if (loopstart < loopend) { 565 $('.actionTakenCounter').html(digits(loopstart)); 566 loopstart = loopstart + increment; 567 } 568 else { 569 clearInterval(counter); 570 $('.actionTakenCounter').html(digits(loopstart)); 571 } 572 }, 1000); 573 574 $(".infoGraphicHomepage .sectionCounter .episodeImpact").html(jd.data.startTotalResponses.episode_impact.episode1.total_impact); 575 $(".infoGraphicHomepage .sectionCounter .socialInteractions").html(jd.data.startTotalResponses.episode_impact.episode1.donations); 576 $(".infoGraphicHomepage .sectionCounter .donations").html(jd.data.startTotalResponses.episode_impact.episode1.social_impressions); 577 });
578 579 580 }*/ 581 /** Homepage Values JSON ends **/ 582 583 $(".bannerContent ul li.showtimings a").click(function () { 584 $(".timeBanner").addClass("timeBannerShow"); 585 $(".timeBanner").css({ "margin-left": "-" + ($(".timeBanner").outerWidth() / 2) + "px", "top": ($(this).offset().top + 30) + "px" }) 586 $("html,body").animate({ scrollTop: $(this).offset().top - 50 }) 587 $(".overlay").css({ "height": $(document).height() + "px", "z-index": 999 }).show(); 588 $(".overlay, .timeBanner > span.close").one("click", function () { 589 $(".timeBanner").removeClass("timeBannerShow"); 590 $(".overlay").removeAttr("style"); 591 $("html,body").animate({ scrollTop: 0 }) 592 return false; 593 }); 594 }); 595 596 var isMSIE = /*@cc_on!@*/0; 597 /*For Social Sharing Starts*/ 598 //var shareHandlerURL = "http://www.satyamevjayate.in"; 599 shareHandlerURL = location.protocol + "//" + location.host; 600 var url, jsondata; 601 602 $(".shareThisPageContent .shareText").click(function () { 603 $(".shareThisPageContent .socials").slideToggle(); 604 }); 605 606 if ($(".socials").length) { 607 $(".socials").each(function (i) { 608 $(".socials").eq(i).children("a").attr("target", "_blank"); 609 if ($(".socials").eq(i).parents(".thisShared").prev(".content").length) { 610 url = shareHandlerURL + $(".socials").eq(i).parents(".thisShared").prev(".content").children("a").attr("href"); 611 } 612 else { 613 url = window.location.href; 614 } 615 616 url = encodeURIComponent(url); 617 618 $(".socials").eq(i).children(".fb-share").attr("href", "https://www.facebook.com/sharer/sharer.php?u=" + url); 619 $(".socials").eq(i).children(".tweet-share").attr("href", "https://twitter.com/share?url=" + url); 620 $(".socials").eq(i).children(".google-share").attr("href", "https://plus.google.com/share?url=" + url); 621 622 socialSharing(url,i); 623 624 /*(function(i) { // protects i in an immediately called function 625 $.getJSON("http://graph.facebook.com/?id=" + url, function (data) { 626 if(typeof(data.shares)!=undefined) 627 { 628 $(".socials").eq(i).children(".fb-share").children("span").html(data.shares); 629 } 630 }); 631 })(i); 632 633 (function(i) { // protects i in an immediately called function 634 $.getJSON("https://cdn.api.twitter.com/1/urls/count.json?url=" + url + '&callback=?', function (data) { 635 $(".socials").eq(i).children(".tweet-share").children("span").html(data.count); 636 }); 637 })(i); 638 639 (function(i) { // protects i in an immediately called function 640 $.getJSON(shareHandlerURL+"/Common/handlerSocialCountSum.ashx?URL=" + url, function (data) { 641 $(".socials").eq(i).children(".google-share").children("span").html(data.GooglePlusShares); 642 $(".socials").eq(i).parents(".thisShared").children(".agShare").children("span").eq(1).html(data.TotShare + " shares"); 643 }); 644 })(i);*/ 645 }); 646 } 647 /*For Social Sharing Ends*/ 648 /* New Js - Start*/ 649 650 if ($(".mediaInfoGraphic").length) { 651 $("body").append("<div class='tooltip'><img src='/uploads/tooltip-bg.png' alt='' /><p> </p></div>"); 652 } 653 654 /** For Homepage Link click Page scroll functionality **/ 655 $(".scrollLinks li a").click(function () { 656 if ($(this).attr("rel") == "actNowMaster") { 657 $(".actNow .expandar").click(); 658 } 659 else { 660 if ($(".actNow").hasClass("ieSpecial")) { 661 $(".actNow .expandar").click(); 662 } 663 } 664 $("html,body").animate({ 665 scrollTop: $("." + $(this).attr("rel")).offset().top - 135 666 }, 1000); 667 }); 668 /** For Homepage Link click Page scroll functionality ends **/ 669 670 $(".selectBox").each(function () { 671 if (!$(this).hasClass("episodeBox")) { 672 $(this).find(".selectedValue").text($(this).find("select option:selected").text()); 673 } 674 else { 675 //episodeSelectChange($(this).find("select"));
676 if ($(this).children("select").children("option").length <= 1) { 677 $(this).children(".arrow").hide(); 678 $(this).children("select").css("visibility", "hidden"); 679 } 680 } 681 }); 682 683 if (window.location.href.indexOf("lang=") != -1) { 684 $(".related-video-list .li a").each(function () { 685 langParam = window.location.href.substr(window.location.href.match(/lang=/).index + 5); 686 $(this).attr("href", $(this).attr("href").replace($(this).attr("href").substr($(this).attr("href").match(/lang=/).index + 5), langParam)) 687 }); 688 } 689 690 $(".selectBox select").change(function () { 691 var langParam, selectedVal; 692 if ($(this).parents(".episodeBox").length) { 693 //episodeSelectChange($(this)); 694 window.location.href = $(this).children("option:selected").attr("value"); 695 } 696 else if ($(this).parents(".selectBox").hasClass("videoPopPage")) { 697 langParam = window.location.href.substr(window.location.href.match(/lang=/).index + 5, $(this).val()); 698 window.location.href = window.location.href.replace(window.location.href.substr(window.location.href.match(/lang=/).index + 5), $(this).val()); 699 } 700 /*else if($(this).parents(".selectBox").parent().hasClass("selectngo")) 701 { 702 if($(this).find("option:selected").attr("value")!=0) 703 { 704 $(this).parents(".selectBox").find(".selectedValue").text($(this).find("option:selected").text()); 705 window.parent.open($(this).find("option:selected").attr("value")); 706 } 707 }*/ 708 else { 709 if ($(this).parents(".selectBox").hasClass("watchLanguages")) { 710 if ($(this).val()) { 711 selectedVal = $(this).val(); 712 $("#eVideos a").each(function () { 713 if ($(this).attr("href").match(/lang=/) != null) { 714 langParam = $(this).attr("href").substr($(this).attr("href").match(/lang=/).index + 5, $(this).attr("href").length); 715 $(this).attr("href", $(this).attr("href").replace(langParam, selectedVal)); 716 } 717 }); 718 } 719 } 720 else if ($(this).parents(".selectBox").hasClass("selectEpisode") || $(this).parents(".selectBox").hasClass("selectNGO")) { 721 $(".ngo-not-available,.selectngo").hide(); 722 $(".donatelist .radiobox").removeClass("checked"); 723 $(".donatelist input[type='radio']").removeAttr("checked"); 724 $(".donate_cta a").attr("href", "javascript:;"); 725 } 726 $(this).parents(".selectBox").find(".selectedValue").text($(this).find("option:selected").text()); 727 } 728 }); 729 730 $(".searchClick > span").click(function () { 731 $(this).siblings().toggle("fast"); 732 $(this).siblings().find("input:text").focus(); 733 }); 734 735 $(".recentUpdates .expandar").click(function () { 736 $(this).find(".arrow").toggleClass("active"); 737 $(this).parents(".recentUpdates").find(".updatesMaster").slideToggle(); 738 }); 739 740 $(".epicDropdown > a").click(function (e) { 741 e.stopPropagation(); 742 $(this).parent().toggleClass("active").siblings(".epicDropdown").removeClass("active"); 743 }); 744 745 $(document).click(function (e) { 746 if ($(".epicDropdown.active").length) { 747 $(".epicDropdown.active").removeClass("active"); 748 } 749 }); 750 751 $(".tabs").click(function () { 752 $(this).addClass("active").siblings(".tabs").removeClass("active"); 753 if ($(this).parents(".deskTabs").length) { 754 $(".tabsMaster .tabs").eq($(this).index()).addClass("active").siblings(".tabs").removeClass("active"); 755 if (window.location.href.indexOf("ArtCat") != -1) { 756 var TabText = $(this).children("a").text(); 757 if (TabText == "Establishments") { 758 TabText = "BigEstablishments"; 759 } 760 var assignURLOnTabChange = window.location.href.substr(0, window.location.href.lastIndexOf("=") + 1) + TabText; 761 assignURLOnTabChange = encodeURIComponent(assignURLOnTabChange); 762 $(".socials a").each(function () { 763 $(this).attr("href", $(this).attr("href").substr(0, $(this).attr("href").indexOf("=") + 1) + assignURLOnTabChange); 764 }); 765 socialSharing(assignURLOnTabChange,0); 766 } 767 } else { 768 var thisIndex = $(this).index() / 2; 769 $(".deskTabs .tabs").eq(thisIndex).addClass("active").siblings(".tabs").removeClass("active"); 770 } 771 if ($(this).next().hasClass("tabContent")) { 772 $(this).next().show().siblings(".tabContent").hide(); 773 if ($(this).parents(".contentWrapMaster.actNow").length) { 774 $("html,body").animate({ scrollTop: $(this).offset().top - 200 }) 775 } 776 else { 777 $("html,body").animate({ scrollTop: $(this).offset().top - 4 }) 778 } 779 } 780 else { 781 var showMe = $(".tabsMaster .tabContent").eq($(this).index()); 782 showMe.show().siblings(".tabContent").hide(); 783 if (showMe.find(".tabtop").length) { 784 showMe.find(".tabtop").css("left", $(this).position().left + "px") 785 } 786 } 787 788 }).eq(0).click(); 789 790 /* If Petitition - Start */ 791 if (windowLocation.indexOf("?Petition=") != -1) { 792 var actAccordVal = parseInt(windowLocation.split("?Petition=")[1]) - 1; 793 $(".contentWrapMaster.actNow .tabsMaster .tabs").eq(actAccordVal).click(); 794 } 795 /* If Petitition - End */ 796 797 798 $(".oLink").click(function () { 799 $(this).parents(".blocks").hide().siblings(".blocks").fadeIn(); 800 });
801 802 $("#weVideos .snippetColumn > a").hover(function () { 803 $(".hoverContent").hide(); 804 $(this).find(".hoverContent").fadeIn(); 805 $(this).find("h2").slideUp(); 806 }, function () { 807 $(this).find(".hoverContent").fadeOut(); 808 $(this).find("h2").slideDown(); 809 }); 810 811 812 if ($(window).width() < 959) { 813 $(".actNowMaster").addClass("d_ActNowMaster") 814 } 815 816 $(".actNow .expandar, #actNowLogo, .actNowMaster .box1").click(function () { 817 /*if(!$(".actNow .expandar").is(":animated") && !$(".actNowMaster").hasClass("d_ActNowMaster")){ 818 if(!$(".actNow").hasClass("perspective")){ 819 $(this).animate({"left":0},300,function(){ 820 $(this).hide(); 821 //$("#actNowLogo").delay(300).animate({top:"-27px"},300); 822 $("#actNowLogo").delay(200).animate({'opacity':0},300); 823 $(".box1").slideUp(300, function(){ 824 $(".boxAll").show(0,function(){ 825 $(".actNow").toggleClass("perspective"); 826 setTimeout(function(){ 827 //$("#actNowLogo").animate({"left":"-580px"},500,function(){ 828 $("#actNowLogo").css({"top":"-4px", "left":"-580px"}).animate({'opacity':1},300); 829 $(".bgBox").fadeIn(300,function(){ 830 $(".boxAll").hide(); 831 $(".box2").fadeIn(300); 832 $(".actNow .expandar").stop(true,true).fadeIn(300); 833 }); 834 //}); 835 },1200); 836 }); 837 }); 838 839 }); 840 }else{ 841 $(".actNow").removeClass("perspective"); 842 $(".actNow .expandar").fadeOut(); 843 $(".box2").fadeOut(300,function(){ 844 845 $("#actNowLogo").animate({"left":"0px"},500,function(){ 846 //$("#actNowLogo").fadeOut(500,function(){ 847 $(".bgBox").fadeOut(300); 848 849 $("#actNowLogo").animate({"top":"0"},300,function(){ 850 $(".box1").slideDown(300,function(){ 851 $(".actNow .expandar").css("left",0).show(); 852 $(".actNow .expandar").animate({"left":"-33px"},300); 853 $(".actNow .expandar").stop(true,true).fadeIn(300); 854 }); 855 856 }); 857 }); 858 }); 859 } 860 }*/ 861 862 if (!(isiPhone || isAndroid || isWindowsPhone) && !$(".actNowMaster").hasClass("d_ActNowMaster") || $(window).width() > 1000) {// do IE-specific things 863 864 865 866 if (!$(".actNow").hasClass("ieSpecial")) { 867 868 869 //$(this).animate({"left":0},300,function(){ 870 //$("#actNowLogo").addClass("inBox2").animate({"opacity":0},300) 871 $("#actNowLogo").css("z-index", 3); 872 //$(".bgBox").stop(false,true).fadeIn(300,function(){ 873 $("#actNowLogo").addClass("inBox2").removeAttr("style").css({ "opacity": 0 }) 874 $("#actNowLogo").css({ "top": "-25px", "left": "-560px" }).animate({ "opacity": 1 }, 800); 875 $(".actNow .box2").stop(false, true).fadeIn(800); 876 $(".actNow").addClass("ieSpecial"); 877 $(".actNow .expandar").stop(false, true).delay(600).fadeIn(300); 878 879 //}); 880 // }); 881 } 882 else { 883 $(".actNow").removeClass("ieSpecial"); 884 $(".actNow .expandar").stop(false, true).fadeOut() 885 $(".box2").fadeOut(); 886 $("#actNowLogo").stop(false, true).fadeOut(300, function () { 887 $("#actNowLogo").removeClass("inBox2").css({ "left": "92px", "top": "20px" }).fadeIn(); 888 //$(".bgBox").stop(false,true).hide(300); 889 //$(".actNow .box2").removeAttr("style"); 890 $(".actNow .expandar").css("left", 0).show(); 891 $(".actNow .expandar").css({ "left": "-32px" }); 892 $(".actNow .expandar").stop(true, true).fadeIn(300); 893 }); 894 895 896 897 898 899 900 901 } 902 903 } else { //Devices 904 if (!$(".actNow").hasClass("d_ActNow")) { 905 $(".actNow").addClass("d_ActNow"); 906 $(".actNow .box1").slideUp(); 907 $(".actNow .box2").slideDown(); 908 $("html,body").animate({ scrollTop: $(".d_ActNowMaster").offset().top }) 909 } 910 else { 911 $(".actNow").removeClass("d_ActNow"); 912 $(".actNow .box2").slideUp(); 913 $(".actNow .box1").slideDown(); 914 $("html,body").animate({ scrollTop: $(".d_ActNowMaster").offset().top }) 915 } 916 } 917 918 919 });
920 921 if ($(".ngoBox").length) { 922 if ($(".ngoBox .container").length == 1) { 923 $(".contentMaster").addClass("ngo_1").removeClass("ngo_2"); 924 } 925 else if ($(".ngoBox .container").length == 3) { 926 $(".contentMaster").addClass("ngo_1").removeClass("ngo_2"); 927 } 928 } 929 930 if ($(".owl-carousel-1").length && $(".ngoBox .container").length > 3) { 931 $(".owl-carousel-1").owlCarousel({ 932 items: 2, //10 items above 1000px browser width 933 itemsDesktop: [1000, 2], //5 items between 1000px and 901px 934 itemsDesktopSmall: [900, 2], // betweem 900px and 601px 935 itemsTablet: [600, 1], //2 items between 600 and 0 936 itemsMobile: [320, 1], 937 pagination: true, 938 rewindNav: false/*, 939 addClassActive : true*/ 940 }); 941 } 942 943 if ($(".owl-carousel-2").length) { 944 $(".owl-carousel-2").owlCarousel({ 945 items: 2, //10 items above 1000px browser width 946 itemsDesktop: [1000, 2], //5 items between 1000px and 901px 947 itemsDesktopSmall: [900, 2], // betweem 900px and 601px 948 itemsTablet: [600, 2], //2 items between 600 and 0 949 itemsMobile: [320, 2], 950 pagination: true, 951 rewindNav: false/*, 952 addClassActive : true*/ 953 }); 954 } 955 956 //if ($(".recent-owl-carousal .column").length) { 957// $(".recent-owl-carousal").owlCarousel({ 958// items: 3, //10 items above 1000px browser width 959// itemsDesktop: [1000, 3], //5 items between 1000px and 901px 960// itemsDesktopSmall: [900, 3], // betweem 900px and 601px 961// itemsTablet: [600, 2], //2 items between 600 and 0 962// itemsMobile: [320, 1], 963// pagination: true, 964// rewindNav: false/*, 965// addClassActive : true*/ 966// }); 967// } 968 969 970 971 972 if ($(".web-exclusive-carousal").length/* && (isiPhone || isAndroid || isWindowsPhone || isiPad)*/) { 973 $(".web-exclusive-carousal").owlCarousel({ 974 items: false, //10 items above 1000px browser width 975 itemsDesktop: [1024, 3], //5 items between 1000px and 901px 976 itemsDesktopSmall: [768, 2], // betweem 900px and 601px 977 itemsTablet: [600, 2], //2 items between 600 and 0 978 itemsMobile: [480, 1], 979 pagination: true, 980 rewindNav: false/*, 981 addClassActive : true*/ 982 }); 983 } 984 985 if ($(".promoThumbs .ul").length/* && (isiPhone || isAndroid || isWindowsPhone || isiPad)*/) { 986 $(".promoThumbs .ul").owlCarousel({ 987 items: 3, //10 items above 1000px browser width 988 itemsDesktop: [1024, 3], //5 items between 1000px and 901px 989 itemsDesktopSmall: [768, 3], // betweem 900px and 601px 990 itemsTablet: [600, 2], //2 items between 600 and 0 991 itemsMobile: [480, 2], 992 pagination: true, 993 rewindNav: false/*, 994 addClassActive : true*/ 995 }); 996 } 997 998 if ($(".gallery-carousel .related-video .ul").length/* && (isiPhone || isAndroid || isWindowsPhone || isiPad)*/) { 999 $(".gallery-carousel .related-video .ul").owlCarousel({ 1000 items: 3, //10 items above 1000px browser width 1001 itemsDesktop: [959, 4], //5 items between 1000px and 901px 1002 itemsDesktopSmall: [768, 4], // betweem 900px and 601px 1003 itemsTablet: [600, 3], //2 items between 600 and 0 1004 itemsMobile: [480, 3], 1005 pagination: true, 1006 /*navigation:true,*/ 1007 rewindNav: false/*, 1008 addClassActive : true*/ 1009 }); 1010 } 1011 1012 if ($(".timeBanner .internationalChannelsTime .part2").length/* && (isiPhone || isAndroid || isWindowsPhone || isiPad)*/) { 1013 $(".timeBanner .internationalChannelsTime .part2").owlCarousel({ 1014 items: 4, //10 items above 1000px browser width 1015 itemsDesktop: [959, 4], //5 items between 1000px and 901px 1016 itemsDesktopSmall: [768, 3], // betweem 900px and 601px 1017 itemsTablet: [600, 2], //2 items between 600 and 0 1018 itemsMobile: [480, 1], 1019 pagination: true, 1020 /*navigation:true,*/ 1021 rewindNav: false/*, 1022 addClassActive : true*/ 1023 }); 1024 } 1025 1026 if ($(".photGallery").length/* && (isiPhone || isAndroid || isWindowsPhone || isiPad)*/) { 1027 $(".photGallery").owlCarousel({ 1028 items: 1, //10 items above 1000px browser width 1029 itemsDesktop: [959, 1], //5 items between 1000px and 901px 1030 itemsDesktopSmall: [768, 1], // betweem 900px and 601px 1031 itemsTablet: [600, 1], //2 items between 600 and 0 1032 itemsMobile: [480, 1], 1033 pagination: true, 1034 rewindNav: false/*, 1035 addClassActive : true*/ 1036 }); 1037 } 1038 1039 1040 1041 1042 if (windowLocation.indexOf("&ArtCat=") != -1) { 1043 var myPower = windowLocation.split("&ArtCat=")[1]; 1044 //DisplayVideos1_divdeskPolice 1045 if ($("#DisplayVideos1_divdesk" + myPower).length) { 1046 $("#DisplayVideos1_divdesk" + myPower).click(); 1047 } 1048 } 1049 1050 /* New Js - End*/ 1051 1052 /* Show Hide Verticle Ad */ 1053 if ($(window).width() < 1245) { 1054 $(".verticalAd").remove(); 1055 } 1056 /* Show Hide Verticle Ad - End*/ 1057 1058 1059 if (isMSIE) { // do IE-specific things 1060 $("body").addClass("nonCssTransition"); 1061 $(".deviceMaster").wrapAll("<div class='ieOv' />"); 1062 } 1063 else { 1064 if (isiPhone || isAndroid || isWindowsPhone || isiPad) { 1065 $("body").addClass("deviceArrow"); 1066 $(".deviceMaster").wrapAll("<div class='deviceOv' />"); 1067 } else { 1068 $("body").addClass("cssTransition"); 1069 } 1070 } 1071 1072 1073 1074 $(".picture-story li").click(function () { 1075 $(".picture-story .video").show(); 1076 $(".picture-story .video img").attr("src", $(this).children("a").attr("rel")).show(); 1077 $(".picture-story .video .pic-detail").html($(this).children(".img_content").html()); 1078 $(this).addClass("active").siblings("li").removeClass("active"); 1079 }).eq(0).click(); 1080 1081 if (!(navigator.platform == "iPad")) { 1082 $(".episodeNav").addClass("iPadHover"); 1083 } 1084 1085 // Tabs For Terms & Conditions Start // 1086 $('.tablinks li').click(function () { 1087 var index = $(this).index(); 1088 $('.tabcontent').eq(index).show().siblings('.tabcontent').hide(); 1089 $(this).addClass("active").siblings().removeClass("active"); 1090 }).eq(0).click(); 1091 1092 // Tabs For Terms & Conditions End // 1093 1094 1095 /** Episode Dropdown Functionality starts **/ 1096 $(".episodicDD select").change(function (e) { 1097 if ($(this).children("option:selected").index() != 0) { 1098 window.location.href = $(this).children("option:selected").attr("value"); 1099 } 1100 else { 1101 e.preventDefault(); 1102 } 1103 });
1104 /** Episode Dropdown Functionality ends **/ 1105 /*if (isiPhone || isAndroid || isWindowsPhone || isiPad){ 1106 $("#season2").hide(); 1107 }*/ 1108 1109 var isInIFrame = (window.location != window.parent.location); 1110 1111 if (isInIFrame == false) { 1112 $(".popupvideoContainer .headerMaster,.popupvideoContainer .headerMaster .header,.popupvideoContainer .section1 .bannerMaster,.popupvideoContainer .section1 .pageLinks").show(); 1113 $(".popupvideoContainer").addClass("wrapperBg"); 1114 } 1115 /* Custom CheckBox & Radio - Start*/ 1116 1117 if ($('.radiobox input:checked').length) { 1118 $('.radiobox input:checked').each(function () { 1119 $(this).parents(".radiobox").addClass("checked"); 1120 }); 1121 } 1122 1123 if ($('.checkBox input:checked').length) { 1124 $('.checkBox input:checked').each(function () { 1125 $(this).parents(".checkBox").addClass("checked"); 1126 }); 1127 } 1128 1129 $(".checkBox input:checkbox").click("change", function () { 1130 $(this).is(":checked") ? $(this).parent().addClass("checked") : $(this).parent().removeClass("checked"); 1131 }); 1132 1133 /*$(".radiobox input:radio").click("change", function(){ 1134 if($(this).closest(".donatelist") && $(".selectEpisode select").children("option:selected").attr("value")!=0) 1135 { 1136 if($(this).is(":checked")) 1137 { 1138 if($(this).attr("id")=="in") 1139 { 1140 $(".selectngo").hide(); 1141 window.parent.open("http://www.axisbank.com/Satyamev-Jayate/index.html"); 1142 } 1143 else 1144 { 1145 if($(".donatelist .selectEpisode select").children("option:selected").attr("value")=="no-ngo") 1146 { 1147 $(".ngo-not-available").show(); 1148 $(".selectngo").hide(); 1149 } 1150 else 1151 { 1152 $(".ngo-not-available").hide(); 1153 $(".selectngo").show(); 1154 } 1155 //window.parent.open(""); 1156 } 1157 } 1158 } 1159 $(this).parent().addClass("checked").parents(".radioBoxMaster").siblings().find(".radiobox").removeClass("checked"); 1160 });*/ 1161 1162 /*$(".wrapper input[type != 'submit'], .wrapper textarea").focus(function () { 1163 myFocus(this); 1164 }); 1165 1166 $(".wrapper input[type != 'submit'], .wrapper textarea").blur(function () { 1167 myBlur(this); 1168 });*/ 1169 1170 /* Custom CheckBox & Radio - End */ 1171 1172 /* Tell Story - Toggle Start */ 1173 $(document).on('click', ".tellStory a", function () { 1174 $(".tell_us_story").css("height", "auto").slideToggle(); 1175 }); 1176 /* Tell Story - Toggle End */ 1177 1178 1179 1180 1181 $("#promos, .promoArrow").click(function () { 1182 if (!$("#season2").is(":animated")) { 1183 promoSlide(); 1184 } 1185 }); 1186 1187 1188 /** Lightbox functionality starts **/ 1189 if (!$(".Insights").length) { 1190 if ((window.location.href == window.parent.location.href) && $(".homeBanner").length && (!$.cookie("lightboxDisclaimerPopUp"))) { 1191 $.cookie("lightboxDisclaimerPopUp", "true", { path: '/', expires: 365 }); 1192 $(".overlay").show(); 1193 $(".lightboxDisclaimerPopUp").css({ "left": ($(window).width() - $(".lightboxDisclaimerPopUp").width()) / 2 + "px", "top": ($(window).height() - $(".lightboxDisclaimerPopUp").height()) / 2 + $(window).scrollTop() + "px" }); 1194 $(".lightboxDisclaimerPopUp").css({ "left": ($(window).width() - $(".lightboxDisclaimerPopUp").width()) / 2 + "px" }); 1195 $(".lightboxDisclaimerPopUp").fadeIn('slow'); 1196 $(window).resize(function () { 1197 $(".lightboxDisclaimerPopUp").css({ "left": ($(window).width() - $(".lightboxDisclaimerPopUp").width()) / 2 + "px", "top": ($(window).height() - $(".lightboxDisclaimerPopUp").height()) / 2 + $(window).scrollTop() + "px" }); 1198 }); 1199 } 1200 1201 if (!$.cookie("telecastDisclaimer")) { 1202 $.cookie("telecastDisclaimer", "true", { path: '/', expires: 365 }); 1203 } 1204 1205 $(".telecastDisclaimer a").click(function () { 1206 $(".telecastDisclaimer").slideUp(); 1207 $.cookie("telecastDisclaimer", "true", { path: '/', expires: 365 }); 1208 }); 1209 1210 if (!$.cookie("homepageBanner")) { 1211 $.cookie("homepageBanner", "1", { path: '/', expires: 365 }); 1212 $(".homeBanner img").eq(0).fadeIn(); 1213 } 1214 else { 1215 if ($.cookie("homepageBanner") == 1) { 1216 $(".homeBanner img").eq(1).fadeIn(); 1217 $.cookie("homepageBanner", "2", { path: '/', expires: 365 }); 1218 } 1219 else { 1220 $(".homeBanner img").eq(0).fadeIn(); 1221 $.cookie("homepageBanner", "1", { path: '/', expires: 365 }); 1222 } 1223 } 1224 } 1225 1226 1227 1228 if (!(isiPhone || isAndroid || isWindowsPhone || isiPad)) { 1229 //$("#deviceCSS").remove(); 1230 //$(".videoLink, .videoIC .iframe a, .iframeThumbs ul li a, .intro-video, .promoThumbs ul li a").click(function(event,$this) { 1231 //$(".intro-video, .promoThumbs ul li a, .donatePopup, .supportCause .donateLink").click(function(event,$this) { 1232 $(".promoThumbs ul li a, .donatePopup, .supportCause .donateLink").click(function (event, $this) { 1233 $(".lightBox").removeClass('lightBox-disquss-thumb'); 1234 $(".lightBox").removeClass('lightBox-disquss'); 1235 1236 1237 if ($(this).hasClass("intro-video")) { 1238 $(".lightBox").addClass("lightBox-disquss-thumb") 1239 } 1240 if ($(this).parents(".box960").hasClass("videoIC")) { 1241 $(".lightBox").addClass("lightBox-disquss") 1242 } 1243 if ($(this).parents("div").hasClass("promoIframe") || $(this).parents("div").hasClass("promoThumbs")) { 1244 $(".section2").css("z-index", "auto"); 1245 } 1246 1247 event.preventDefault(); 1248 $this = $(this); 1249 1250 1251 //var overlayHeight=$(window).scrollTop()+880; 1252 1253 var overlayHeight = $(window).height(); 1254 1255 /*$(".wrapper").css({"height":overlayHeight+"px","overflow":"hidden"});*/ 1256 1257 $(".overlay").animate({ "height": overlayHeight + "px" }, 1000, function () { 1258 $(".overlay").addClass("popupOver").slideDown(); 1259 $(".lightBox").css("visibility", "hidden").show(0, '', function () { 1260 var cntrDiv = $('.lightBox'); 1261 var height = $(window).height(); 1262 var width = $(window).width(); 1263 var cntrDivHt = parseInt(cntrDiv.css("height")); 1264 var left = ((width - parseInt(cntrDiv.css("width"))) / 2); 1265 var top = ((height - parseInt(cntrDiv.css("height"))) / 2); 1266 $(this).find("iframe").attr('src', $this.attr("href")); 1267 cntrDiv.css({ 'left': left, 'top': top + $(window).scrollTop(), 'visibility': 'visible' }); 1268 1269 $(".overlay").one('click', function () { 1270 $(".popUp-close").click(); 1271 }); 1272 }); 1273 }); 1274 1275 $(".disqus_frame").load(function () { 1276 $(this).contents().find(".wrapper").addClass("videoPopUp"); 1277 }); 1278 }); 1279 1280 } 1281 1282 $(".popUp-close").click(function () { 1283 if ($(".lightboxDisclaimerPopUp").length) { 1284 $(".lightboxDisclaimerPopUp").hide(); 1285 $(".telecastDisclaimer").slideDown(); 1286 } 1287 1288 $(".overlay").removeClass("popupOver");
1289 $(this).parents(".lightBox").slideUp('0', function () { $(".lightBox iframe").attr("src", ""); }); 1290 if (!$('body').hasClass("ovStatus")) { 1291 $(".overlay").hide(); 1292 $(".wrapper").removeAttr("style"); 1293 } 1294 else { 1295 $(".wrapper").css("height", "auto"); 1296 } 1297 $(".section2").css("z-index", "1001"); 1298 $(".storydetail").hide(); 1299 }); 1300 1301 /** Lightbox functionality ends **/ 1302 1303 $("#mSearch").click(function () { 1304 $(this).toggleClass("active"); 1305 if ($(this).hasClass("active")) { 1306 $(".header").css({ "height": "+=20px" }); 1307 $(".star").css("margin-top", "+=20px") 1308 } 1309 else { 1310 $(".header").css({ "height": "-=20px" }); 1311 $(".star").css("margin-top", "-=20px") 1312 } 1313 $(".searchClick").toggle(); 1314 }); 1315 1316 1317 1318 $("#mTopMenu").click(function () { 1319 if (!$(this).hasClass("active")) { 1320 $(this).addClass("active"); 1321 $(".overlay").fadeIn(); 1322 $("body").css({ "overflow": "hidden", "background-color": "#156d9d" }); 1323 $(".wrapper, .overlay").css("overflow", "visible").animate({ "left": "-80%" }, 300); 1324 $(".overlay").css({ "top": "70px" }); 1325 $(".overlay").one('click', function () { 1326 $(".overlay").unbind('click') 1327 $("#mTopMenu").click(); 1328 }); 1329 } 1330 else { 1331 $(this).removeClass("active"); 1332 $(".overlay").removeAttr("style").hide() 1333 $(".wrapper").css("left", $(".wrapper").css("left")).animate({ "left": 0 }, 300, function () { 1334 $(this).removeAttr("style"); 1335 $('body').removeAttr("style") 1336 }); 1337 } 1338 }); //.eq(0).click(); 1339 1340 ADjust(); 1341 1342 1343 1344 /** Video Lightbox starts **/ 1345 1346 $(".gallery-carousel .related-video li img").click(function () { 1347 //".gallery-carousel .related-video .prev").addClass("prev-inactive"); 1348 if (($(this).prop("rel"))) { 1349 if (($(this).attr("rel").indexOf(".jpg") || $(this).attr("rel").indexOf(".jpeg") || $(this).attr("rel").indexOf(".png")) != -1) { 1350 $(".gallery-carousel .video img").show(); 1351 $(".gallery-carousel .video img").attr("src", $(this).attr("rel")); 1352 $(this).parent("li").addClass("active").siblings("li").removeClass("active"); 1353 } 1354 } 1355 })/*.eq(0).click()*/; 1356 1357 $(".gallery-carousel .related-video .next").click(function () { 1358 //console.log($(".gallery-carousel .related-video ul").find(".active").nextAll("li").length) 1359 if ($(".gallery-carousel .related-video ul").find(".active").nextAll().length > 2) { 1360 $(".gallery-carousel .related-video .prev").removeClass("prev-inactive"); 1361 $(".gallery-carousel .related-video ul").stop(false, true).animate({ "margin-left": "-=" + relatedVideoListThumbWidth + "px" }); 1362 $(".gallery-carousel .related-video ul").find(".active").next("li").addClass("active").siblings("li").removeClass("active"); 1363 if ($(".picture-story").length) { 1364 $(".picture-story .video img").attr("src", $(".picture-story .active a").attr("rel")); 1365 $(".picture-story .video .pic-detail").html($(".picture-story .active .img_content").html()); 1366 } 1367 } 1368 else { 1369 $(".gallery-carousel .related-video ul").find(".active").next("li").addClass("active").siblings("li").removeClass("active"); 1370 $(".picture-story .video img").attr("src", $(".picture-story .active a").attr("rel")); 1371 $(".picture-story .video .pic-detail").html($(".picture-story .active .img_content").html()); 1372 if (!$(".gallery-carousel .related-video ul").find(".active").next("li").length) { 1373 $(this).addClass("next-inactive"); 1374 } 1375 } 1376 }); 1377 1378 $(".gallery-carousel .related-video .prev").click(function () { 1379 if ($(".gallery-carousel .related-video ul").find(".active").prevAll().length > 2) { 1380 $(".gallery-carousel .related-video .next").removeClass("next-inactive"); 1381 $(".gallery-carousel .related-video ul").stop(false, true).animate({ "margin-left": "+=" + relatedVideoListThumbWidth + "px" }); 1382 $(".gallery-carousel .related-video ul").find(".active").prev("li").addClass("active").siblings("li").removeClass("active"); 1383 if ($(".picture-story").length) { 1384 $(".picture-story .video img").attr("src", $(".picture-story .active a").attr("rel")); 1385 $(".picture-story .video .pic-detail").html($(".picture-story .active .img_content").html()); 1386 } 1387 } 1388 else { 1389 $(".gallery-carousel .related-video ul").find(".active").prev("li").addClass("active").siblings("li").removeClass("active"); 1390 $(".picture-story .video img").attr("src", $(".picture-story .active a").attr("rel")); 1391 $(".picture-story .video .pic-detail").html($(".picture-story .active .img_content").html()); 1392 if (!$(".gallery-carousel .related-video ul").find(".active").prev("li").length) { 1393 $(this).addClass("prev-inactive"); 1394 } 1395 else { 1396 $(".gallery-carousel .related-video ul").stop(false, true).animate({ "margin-left": "+=" + relatedVideoListThumbWidth + "px" }); 1397 } 1398 } 1399 });
1400 1401 //comments('satyamevjayatesite','smj_impact','popUp'); 1402 /** Video Lightbox ends **/ 1403 1404 $(".pageLinks ul li a").click(function () { 1405 $(this).parent().addClass("active").siblings().removeClass("active"); 1406 }); 1407 1408 $(".carousal").each(function () { 1409 $(this).find("ul li").eq(0).addClass("active"); 1410 }); 1411 1412 /*$(document).on("click",".cPagination span",function(){ 1413 $(this).addClass("active").siblings().removeClass("active"); 1414 var tIndex = $(this).index(); 1415 var _this = $(this).parents(".carousal").find("ul"); 1416 _this.find("li.active").addClass("left"); 1417 _this.find("li").eq(tIndex).addClass("next left"); 1418 1419 1420 _this.find("li").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', 1421 function(e) { 1422 _this.find("li").eq(tIndex).addClass("active").siblings().removeClass("active"); 1423 _this.find("li").removeClass("left").removeClass("next") 1424 // code to execute after transition ends 1425 }); 1426 });*/ 1427 1428 $(document).on("click", ".cPagination span", function () { 1429 var lastIndex = $(this).parent().find(".active").index(); 1430 $(this).addClass("active").siblings().removeClass("active"); 1431 var tIndex = $(this).index(); 1432 var _this = $(this).parents(".carousal").find("ul"); 1433 1434 if (tIndex > lastIndex) { 1435 _this.find("li").eq(tIndex).addClass("next").stop(false, true).animate({ left: "-=100%" }, 500); 1436 _this.find("li.active").stop(false, true).animate({ left: "-=100%" }, 500, function () { 1437 _this.find("li").removeAttr("style").removeClass("active").removeClass("next"); 1438 _this.find("li").eq(tIndex).addClass("active") 1439 }); 1440 } 1441 else if (tIndex < lastIndex) { 1442 _this.find("li").eq(tIndex).addClass("prev").stop(false, true).animate({ left: "+=100%" }, 500); 1443 _this.find("li.active").stop(false, true).animate({ left: "+=100%" }, 500, function () { 1444 _this.find("li").removeAttr("style").removeClass("active").removeClass("prev"); 1445 _this.find("li").eq(tIndex).addClass("active") 1446 }); 1447 } 1448 1449 }); 1450 1451 /* Watch Episodes Functionality - Start */ 1452 1453 videoSliderInit(); 1454 /*$(".iframeThumbs ul li a").click(function(e){ 1455 e.preventDefault(); 1456 $(this).parent().addClass("active").siblings().removeClass("active"); 1457 if($(this).attr("href").indexOf("youtube") != -1){ 1458 $(this).parents(".iframeThumbs").siblings(".iframe").find("iframe").attr("src",$(this).attr("href")+"?wmode=transparent") 1459 } 1460 else{ 1461 $(this).parents(".iframeThumbs").siblings(".iframe").find("iframe").attr("src",$(this).attr("href")+"&options[wmode]=transparent") 1462 } 1463 1464 }); 1465 $(".iframeThumbs ul li").eq(0).children("a").click();*/ 1466 1467 var yy = 0; 1468 $(document).on("click", ".vpagination span", function (event, trig, offset) { 1469 $(this).addClass("active").siblings().removeClass("active"); 1470 //alert(yy++) 1471 if (trig == undefined) { 1472 $(".iframeThumbs ul").animate({ "margin-left": "-" + $(".iframeThumbs ul li").outerWidth(true) * $(this).index() }, 300); 1473 } 1474 else { 1475 $(".iframeThumbs ul").stop(true, true).css({ "margin-left": "-" + $(".iframeThumbs ul li").outerWidth(true) * $(this).index() + "px" }); 1476 if ($(".iframeThumbs ul li.active").length) { 1477 if (Math.ceil($(".iframeThumbs ul li.active").offset().left + 20) >= offset) { 1478 $(".vpagination span").eq(clickIndex++).trigger("click", ["trig", offset]); 1479 } 1480 } 1481 } 1482 }).eq(0).click(); 1483 1484 /*var promoPagHTML = ""; 1485 $(".promoPagination").html("") 1486 var pDotLength = $(".promoThumbs ul li").length-3; 1487 if(pDotLength > 0){ 1488 for(i=0; i<=pDotLength; i++){ 1489 promoPagHTML += "<span></span>" 1490 } 1491 $(".promoPagination").html(promoPagHTML); 1492 $(".promoPagination span:first").addClass("active"); 1493 $(document).on("click",".promoPagination span",function(event){ 1494 $(this).addClass("active").siblings().removeClass("active"); 1495 //alert(yy++) 1496 $(".promoThumbs ul").animate({"margin-left":"-"+$(".promoThumbs ul li").outerWidth(true)*$(this).index()},300); 1497 1498 1499 });
1500 }*/ 1501 1502 1503 1504 /*$(".iframeThumbs .prev").click(function(){ 1505 if($(".vpagination span.active").prevAll().length){ 1506 $(".vpagination span.active").prev().click(); 1507 } 1508 }); 1509 1510 $(".iframeThumbs .next").click(function(){ 1511 1512 $(".vpagination span.active").next().click(); 1513 if($(".vpagination span.active").nextAll().length != 1){ 1514 $(".vpagination span.active").next().click(); 1515 }else{ 1516 $(".vpagination span.active").next().click(); 1517 } 1518 });*/ 1519 1520 /* Watch Episodes Functionality - End */ // - More In Functions 1521 1522 1523 /* Read Your Story - Start */ 1524 1525 $(".avCarousal ul").width($(".avCarousal ul li").outerWidth(true) * Math.ceil($(".avCarousal ul li").length)); 1526 var reqOffset = ""; 1527 $(document).on("click", ".rs_pagination span", function (event, trig, offset) { 1528 $(this).addClass("active").siblings().removeClass("active"); 1529 if (trig == undefined) { 1530 $(this).parent().siblings(".avCarousal").children("ul").animate({ "margin-left": "-" + $(this).parent().siblings(".avCarousal").children("ul").find("li").outerWidth(true) * $(this).index() }, 300); 1531 } 1532 else { 1533 $(this).parent().siblings(".avCarousal").children("ul").css({ "margin-left": "-" + $(this).parent().siblings(".avCarousal").children("ul").find("li").outerWidth(true) * $(this).index() + "px" }, 300); 1534 /*if(Math.ceil($(".avCarousal ul li.current:first-child").offset().left+20) >= offset ){ 1535 $(".vpagination span").eq(clickIndex++).trigger("click",["trig",offset]); 1536 }*/ 1537 } 1538 1539 }); 1540 1541 readStorySliderInit() 1542 /* Read Your Story - End */ 1543 1544 1545 /* Episode Navigation - Start */ 1546 episodeNavInit() 1547 1548 1549 /* Temp for Iframe to have WMode */ 1550 /*if($("iframe").attr("src").indexOf("youtube") != -1){ 1551 $("iframe").attr("src",$("iframe").attr("src")+"?wmode=transparent") 1552 }*/ 1553 1554 /* For View Archieved - Discus - Start */ 1555 if ($(".commentHeader a").length) { 1556 if ($(".commentHeader a").attr("href").indexOf("disqus.com") > 0) { 1557 var href = $(".commentHeader a").attr("href"); 1558 $(".commentHeader a").attr("href", "javascript:;"); 1559 $(".commentHeader a").attr("rel", href); 1560 1561 $(".commentHeader a").attr("target", ""); 1562 } 1563 } 1564 1565 $('.commentHeader a').click(function () { 1566 popup = window.open($(this).attr("rel")); 1567 popup.opener = null; 1568 }); 1569 1570 /* For View Archieved - Discus - End */ 1571 1572 /** For Page Sharing starts here **/ 1573 /*(function(d, s, id) { 1574 var js, fjs = d.getElementsByTagName(s)[0]; 1575 if (d.getElementById(id)) return; 1576 js = d.createElement(s); js.id = id; 1577 js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; 1578 fjs.parentNode.insertBefore(js, fjs); 1579 }(document, 'script', 'facebook-jssdk')); 1580 1581 1582 !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); 1583 1584 $(function(){ 1585 $(".fb-share-button").attr("data-href",location.href); 1586 $(".shareText").click(function(){ 1587 if($(".shareIcons").css("display")=="none") 1588 { 1589 $(".shareIcons").css("display","block"); 1590 } 1591 else 1592 { 1593 $(".shareIcons").css("display","none"); 1594 } 1595 }); 1596 });*/ 1597 /** For Page Sharing ends here **/ 1598 1599 if ($(".wrapper").attr("rel")) { 1600 var wrapperRel = $(".wrapper").attr("rel").replace(/ 0/, "-"); 1601 wrapperRel = wrapperRel.replace(/ /, '').toLowerCase(); 1602 $(".episodeBox").addClass(wrapperRel); 1603 if (wrapperRel == "episode-1") { 1604 $(".disqus-disclaimer").show(); 1605 if ($(".episodeBox").length) { 1606 $(".episodeBox select").children("option").eq(4).attr("selected", "selected").siblings("option").removeAttr("selected"); 1607 $(".episodeBox .selectedValue").html(""); 1608 $(".episodeBox .selectedValue").text(""); 1609 $(".episodeBox .selectedValue").append("<span>Episode 01: </span>"); 1610 $(".episodeBox .selectedValue").html($(".episodeBox .selectedValue").html() + "Fighting Rape"); 1611 } 1612 } 1613 else if (wrapperRel == "episode-2") { 1614 $(".disqus-disclaimer").hide(); 1615 if ($(".episodeBox").length) { 1616 $(".episodeBox select").children("option").eq(3).attr("selected", "selected").siblings("option").removeAttr("selected"); 1617 $(".episodeBox .selectedValue").html(""); 1618 $(".episodeBox .selectedValue").text(""); 1619 $(".episodeBox .selectedValue").append("<span>Episode 02: </span>"); 1620 $(".episodeBox .selectedValue").html($(".episodeBox .selectedValue").html() + "Police"); 1621 } 1622 } 1623 else if (wrapperRel == "episode-3") { 1624 $(".disqus-disclaimer").hide(); 1625 if ($(".episodeBox").length) { 1626 $(".episodeBox select").children("option").eq(2).attr("selected", "selected").siblings("option").removeAttr("selected"); 1627 $(".episodeBox .selectedValue").html(""); 1628 $(".episodeBox .selectedValue").text(""); 1629 $(".episodeBox .selectedValue").append("<span>Episode 03: </span>"); 1630 $(".episodeBox .selectedValue").html($(".episodeBox .selectedValue").html() + "Don't Waste Your Garbage"); 1631 } 1632 } 1633 else if (wrapperRel == "episode-4") { 1634 $(".disqus-disclaimer").hide(); 1635 if ($(".episodeBox").length) { 1636 $(".episodeBox select").children("option").eq(1).attr("selected", "selected").siblings("option").removeAttr("selected"); 1637 $(".episodeBox .selectedValue").html(""); 1638 $(".episodeBox .selectedValue").text(""); 1639 $(".episodeBox .selectedValue").append("<span>Episode 04: </span>"); 1640 $(".episodeBox .selectedValue").html($(".episodeBox .selectedValue").html() + "Kings Every Day"); 1641 } 1642 } 1643 else if (wrapperRel == "episode-5") { 1644 $(".disqus-disclaimer").hide(); 1645 if ($(".episodeBox").length) { 1646 $(".episodeBox select").children("option").eq(0).attr("selected", "selected").siblings("option").removeAttr("selected"); 1647 $(".episodeBox .selectedValue").html(""); 1648 $(".episodeBox .selectedValue").text(""); 1649 $(".episodeBox .selectedValue").append("<span>Episode 05: </span>"); 1650 $(".episodeBox .selectedValue").html($(".episodeBox .selectedValue").html() + "Criminalization Of Politics"); 1651 } 1652 } 1653 1654 $(".viewersResponded .section").each(function () { 1655 $(this).children(".buttonSection").children("a").attr("href", $(this).children(".buttonSection").children("a").attr("href") + "#" + wrapperRel); 1656 }); 1657 } 1658 1659/* WhatsAPP Share - Functions - Start @ 1 AUG 2014*/ 1660/*if( /Android|webOS|iPhone|iPod|iPad|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {*/ 1661/*if( /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { 1662 $('.waBtn').show(); 1663 1664 }*/ 1665//$('a.waBtn').attr('href',$('a.waBtn').attr('href')+$('.content h2').text()+'%2C%20'+window.location) 1666 1667 1668if(/Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) 1669{ 1670 1671 var metadescription = escape($('meta[name=description]').attr("content")); 1672 $('a.waBtn').attr('href',$('a.waBtn').attr('href')+ metadescription +'%0D%0A' + '%0D%0A'+window.location); 1673 $('a.waBtn').html("<img src='/images/WhatsAppIcon.png' width='60px' height='20px' />"); 1674 $('.waBtn').show(); 1675 1676 1677 /*$('a.waBtn').attr('href',$('a.waBtn').attr('href')+$(document).find("title").text()+'%2C%20'+window.location); 1678 $('a.waBtn').html("<img src='/images/WhatsAppIcon.png' width='60px' height='20px' />"); 1679 $('.waBtn').show();*/ 1680 1681//For On landing BOx WhatsApp Share Start// 1682/*$(".container.column .socials").each(function () { 1683 var awaText = $(this).parents(".thisShared").prev(".content").children("h2").text(); 1684 awaText=awaText.trim(); 1685 var awalink=$(this).parents(".thisShared").prev(".content").children("a").attr("href"); 1686 $(this).children(".LBwaBtn").attr('href',$(this).children(".LBwaBtn").attr('href')+awaText+'%2C%20http://www.satyamevjayate.in'+awalink); 1687 $(this).children(".LBwaBtn").html("<img src='/images/WhatsAppIcon.png' width='60px' height='20px' />"); 1688 $('.LBwaBtn').show(); 1689});*/ 1690//For On landing BOx WhatsApp Share End// 1691} 1692else if(/iPhone|iPod/i.test(navigator.userAgent)) 1693{ 1694 $('a.waBtn').remove();
1695 //var whatsappHTML="<a href='whatsapp://send' data-text='"+ $(document).find("title").text() +"' data-href='"+ window.location +"' class='wa_btn'>Share</a>"; 1696 1697 //var dataText=escape($(document).find("title").text()); 1698 //Below Code Is HIde Seems There are Issue as new Updates for IOS Whats App Share @17SEP2014// 1699 1700 /*var dataText=escape($('meta[name=description]').attr("content"))+ '%0D%0A' + '%0D%0A'; 1701 dataText=dataText.replace(/%u2013/gi,'-'); 1702 1703 var dataHref=escape(window.location); 1704 1705 var whatsappHTML="<a href='whatsapp://send' data-text="+dataText+" data-href="+dataHref+" class='wa_btn' style='background:none;'><img src='/images/WhatsAppIcon.png' width='60px' height='20px' /></a>"; 1706 if($(".contentWrapMaster .sharecurrentpage").length) 1707 { 1708 $(".contentWrapMaster .sharecurrentpage").children(".socials").append(whatsappHTML); 1709 } 1710 else if($(".contentWrapMaster .popUpVideoShare").length) 1711 { 1712 $(".contentWrapMaster .popUpVideoShare").children(".socials").append(whatsappHTML); 1713 } 1714 else if($(".contentWrapMaster .articleDetailShare").length) 1715 { 1716 $(".contentWrapMaster .articleDetailShare").children(".socials").append(whatsappHTML); 1717 } 1718 $('.wa_btn').show(); 1719 */ 1720 1721 //For On landing BOx WhatsApp Share Start// 1722 /*$(".container.column .socials").each(function () { 1723 $(this).children('a.LBwaBtn').remove(); 1724 var iwaText = $(this).parents(".thisShared").prev(".content").children("h2").text(); 1725 iwaText=escape(iwaText.trim()); 1726 var iwalink=$(this).parents(".thisShared").prev(".content").children("a").attr("href"); 1727 var BoxWAhtml="<a href='whatsapp://send' data-text="+iwaText+" data-href='http://www.satyamevjayate.in"+iwalink+"' class='LBwaBtn' style='background:none;'><img src='/images/WhatsAppIcon.png' width='60px' height='20px' /></a>"; 1728 //var BoxWAhtml="<a href='http://www.addtoany.com/add_to/whatsapp?linkurl='http://www.satyamevjayate.in"+iwalink+"'&linkname=+iwaText+'><img src='/images/WhatsAppIcon.png' width='60px' height='20px' /></a>" 1729 $(this).append(BoxWAhtml); 1730 $('.LBwaBtn').show(); 1731 });*/ 1732 //For On landing BOx WhatsApp Share End// 1733 1734} 1735//$('a.waBtn').attr('data-text',$('a.waBtn').attr('data-text')+window.location) 1736 // alert($('a.waBtn').attr('href')) 1737 // alert($('a.waBtn').attr('data-text')) 1738/* WhatsAPP Share - Functions - End @ 1 AUG 2014*/ 1739 1740}); 1741 1742/* Read Your Story - Functions - Start */ 1743 1744function rs_Pagination(noofVisibles){ 1745 $(".rs_pagination").html(""); 1746 var storyLength = $(".avCarousal > ul > li").length; 1747 var spans=""; 1748 if(storyLength-noofVisibles>0) 1749 { 1750 for(var i=0; i <= storyLength-noofVisibles; i++){ 1751 spans += "<span></span>" 1752 } 1753 $(".rs_pagination").html(spans); 1754 } 1755 1756 $(".avCarousal ul li").removeAttr("style").width(($(".avCarousal").width()/noofVisibles)-22); 1757 $(".avCarousal ul").width(($(".avCarousal ul li").outerWidth(true)+1)*$(".avCarousal ul li").length); 1758 1759 1760 var mOffset = $(".avCarousal ul li.current").length ? $(".avCarousal ul li.current:first-child").offset().left : 0; 1761 $(".rs_pagination span").eq(0).trigger("click",["trig",mOffset]); 1762 1763}; 1764 1765function readStorySliderInit(){ 1766 if($(window).width() <= 385){ 1767 rs_Pagination(1); 1768 } 1769 else if($(window).width() <= 640){ 1770 rs_Pagination(2); 1771 } 1772 else if($(window).width() <= 959){ 1773 rs_Pagination(4); 1774 } 1775 else if($(window).width() >= 960){ 1776 rs_Pagination(4) 1777 } 1778 1779 1780} 1781 1782/* Read Your Story - Functions - End */ 1783 1784 1785/* Watch Episodes Functionality - Functions - Start */ 1786var clickIndex=0; 1787function videoSliderInit(){ 1788 $(".iframeThumbs ul").removeAttr("style").removeClass("cCarousal"); 1789 if($(window).width() <= 385){ 1790 var thumbLength = $(".iframeThumbs ul li").length; 1791 var mdotLength = Math.ceil(thumbLength/2)-1; 1792 $(".iframeThumbs ul li").width(($(".iframeThumbs").outerWidth()/2)-16) 1793 if(thumbLength > 4){ 1794 $(".iframeThumbs ul").addClass("cCarousal").width($(".iframeThumbs ul li").outerWidth(true)*Math.ceil($(".iframeThumbs ul li").length/2)); 1795 } 1796 } 1797 else if($(window).width() <= 480){ 1798 var thumbLength = $(".iframeThumbs ul li").length; 1799 var mdotLength = Math.ceil(thumbLength)-1; 1800 $(".iframeThumbs ul li").width(($(".iframeThumbs").outerWidth()/2)-16); 1801 if(thumbLength > 2){
1802 $(".iframeThumbs ul").addClass("cCarousal").width($(".iframeThumbs ul li").outerWidth(true)*Math.ceil(thumbLength)); 1803 } 1804 } 1805 else if($(window).width() <= 640){ 1806 var thumbLength = $(".iframeThumbs ul li").length; 1807 var mdotLength = Math.ceil(thumbLength/2)-1; 1808 $(".iframeThumbs ul li").width(($(".iframeThumbs").outerWidth()/2)-22); 1809 if(thumbLength > 4){ 1810 $(".iframeThumbs ul").addClass("cCarousal").width($(".iframeThumbs ul li").outerWidth(true)*Math.ceil($(".iframeThumbs ul li").length/2)); 1811 } 1812 } 1813 else if($(window).width() <= 768){ 1814 var thumbLength = $(".iframeThumbs ul li").length; 1815 var mdotLength = Math.ceil(thumbLength/3)-1; 1816 $(".iframeThumbs ul li").width(($(".iframeThumbs").outerWidth()/3)-18) 1817 if(thumbLength > 6){ 1818 $(".iframeThumbs ul").addClass("cCarousal").width(($(".iframeThumbs ul li").outerWidth(true)+2)*Math.ceil(thumbLength/2)); 1819 1820 } 1821 } 1822 else if($(window).width() <= 959){ 1823 var thumbLength = $(".iframeThumbs ul li").length; 1824 var mdotLength = Math.ceil(thumbLength/3)-1; 1825 $(".iframeThumbs ul li").width(($(".iframeThumbs").outerWidth()/3)-18) 1826 if(thumbLength > 6){ 1827 $(".iframeThumbs ul").addClass("cCarousal").width(($(".iframeThumbs ul li").outerWidth(true)+2)*Math.ceil(thumbLength/2)); 1828 } 1829 } 1830 else if($(window).width() >= 960){ 1831 var thumbLength = $(".iframeThumbs ul li").length; 1832 var mdotLength = Math.ceil(thumbLength/2)-2; 1833 $(".iframeThumbs ul li").removeAttr("style"); 1834 $(".iframeThumbs ul").width($(".iframeThumbs ul li").outerWidth(true)*Math.ceil(thumbLength/2)); 1835 } 1836 1837 var activeIndex = $(".iframeThumbs ul li.active").index(); 1838 vPaginationInit(mdotLength,activeIndex,$(window).width()) 1839 1840 1841} 1842 1843function vPaginationInit(dotLength,aLink,wWidth){ 1844 //alert("aLink: "+aLink) 1845 var spanHtml = ""; 1846 for(i=0; i<dotLength; i++){ 1847 spanHtml += "<span></span>" 1848 } 1849 $(".vpagination").html(spanHtml); 1850 if(aLink == -1){ 1851 $(".vpagination span").eq(0).click(); 1852 } 1853 else{ 1854 var myoffLeft = Math.ceil($(".iframeThumbs").offset().left)+$(".iframeThumbs").outerWidth(); 1855 if(Math.ceil($(".iframeThumbs ul li.active").offset().left+20) >= myoffLeft ){ 1856 clickIndex =0; 1857 $(".vpagination span").eq(clickIndex).trigger("click",["trig",myoffLeft]); 1858 } 1859 else{ 1860 $(".vpagination span").eq(0).click(); 1861 } 1862 } 1863 1864} 1865/* Watch Episodes Functionality - Functions - End */ 1866 1867function showTimingsReInit(){ 1868 $(".timeBannerShow").css({"margin-left":"-"+($(".timeBanner").outerWidth()/2)+"px"}) 1869} 1870 1871function actNowReset() { 1872 if($(".actNowMaster .box2").is(":visible")) { 1873 $(".actNowMaster").removeAttr("class").addClass("actNowMaster") 1874 $(".actNowMaster *").removeAttr("style"); 1875 $(".actNow").removeAttr("class").addClass("actNow"); 1876 1877 if($(window).width() < 959){ 1878 $(".actNowMaster").addClass("d_ActNowMaster") 1879 } 1880 1881 $(".actNow .expandar").click(); 1882 } 1883} 1884 1885$(window).resize(function() { 1886 episodeNavInit() 1887 ADjust(); 1888 1889 if(this.resizeTO) clearTimeout(this.resizeTO); 1890 this.resizeTO = setTimeout(function() { 1891 $(this).trigger('resizeEnd'); 1892 },1000); 1893 if($(window).width() < 959){ 1894 $(".scrollLinks").hide(); 1895 } 1896 }); 1897 1898$(window).bind('resizeEnd', function() { 1899 //videoSliderInit(); 1900 //readStorySliderInit(); 1901 logoInitiate(); 1902 1903 var isMSIE = /*@cc_on!@*/0; 1904 if(isMSIE){ 1905 } 1906 else{ 1907 actNowReset() 1908 } 1909 if($(".timeBannerShow").length){ 1910 showTimingsReInit(); 1911 } 1912 1913 if($(".accordian .scroll_pane").length && $(window).width() < 959){ 1914 var pane = $(".accordian .scroll_pane") 1915 //pane.jScrollPane({showArrows:true,scrollbarWidth:3,autoReinitialise:true,animateScroll:true}); 1916 var api = pane.data('jsp'); 1917 api.destroy(); 1918 } 1919 else if($(".accordian .scroll_pane").length && $(window).width() > 959){ 1920 var pane = $(".accordian .scroll_pane") 1921 pane.jScrollPane({showArrows:true,scrollbarWidth:3,autoReinitialise:true,animateScroll:true}); 1922 var api = pane.data('jsp'); 1923 $('.yearContent li a').bind( 1924 'click', 1925 function() 1926 { 1927 // Note, there is also scrollToX and scrollToY methods if you only 1928 // want to scroll in one dimension 1929 $(this).parent().addClass("active").siblings().removeClass("active"); 1930 var thisText = $(this).text(); 1931 var scrollElement = $(this).parents(".accordian_content").find(".newsContent .newsGroup").eq($(this).parent().index()).position().top; 1932 api.scrollTo(0,scrollElement); 1933 return false; 1934 } 1935 ); 1936 1937 1938 } 1939 1940 1941 1942 1943}); 1944 1945$(window).load(function(){ 1946 if ($(".recent-owl-carousal .column").length) { 1947 $(".recent-owl-carousal").owlCarousel({ 1948 items: 3, //10 items above 1000px browser width 1949 itemsDesktop: [1000, 3], //5 items between 1000px and 901px 1950 itemsDesktopSmall: [900, 3], // betweem 900px and 601px 1951 itemsTablet: [600, 2], //2 items between 600 and 0 1952 itemsMobile: [320, 1], 1953 pagination: true, 1954 rewindNav: false/*, 1955 addClassActive : true*/ 1956 }); 1957 }/* Added by shiv */ 1958 1959 /*Added by Sunit*/ 1960 if ($(".owl-recentimpact .column").length) { 1961 $(".owl-recentimpact").owlCarousel({ 1962 items: 3, //10 items above 1000px browser width 1963 itemsDesktop: [1000, 3], //5 items between 1000px and 901px 1964 itemsDesktopSmall: [900, 3], // betweem 900px and 601px 1965 itemsTablet: [600, 2], //2 items between 600 and 0 1966 itemsMobile: [320, 1], 1967 pagination: true, 1968 rewindNav: false 1969 }); 1970 } 1971 1972 if ($(".owl-promovideos .column").length) { 1973 $(".owl-promovideos").owlCarousel({ 1974 items: 3, //10 items above 1000px browser width 1975 itemsDesktop: [1000, 3], //5 items between 1000px and 901px 1976 itemsDesktopSmall: [900, 3], // betweem 900px and 601px 1977 itemsTablet: [600, 2], //2 items between 600 and 0 1978 itemsMobile: [320, 1], 1979 pagination: true, 1980 rewindNav: false 1981 }); 1982 } 1983 1984 if ($(".owl-impactBox .column").length) { 1985 $(".owl-impactBox").owlCarousel({ 1986 items: 3, //10 items above 1000px browser width 1987 itemsDesktop: [1000, 3], //5 items between 1000px and 901px 1988 itemsDesktopSmall: [900, 3], // betweem 900px and 601px 1989 itemsTablet: [600, 2], //2 items between 600 and 0 1990 itemsMobile: [320, 1], 1991 pagination: true, 1992 rewindNav: false 1993 }); 1994 } 1995 1996 if(window.location.href.indexOf("lang=")!=-1) 1997 { 1998 1999 $(".videoPopPage select option[value='"+window.location.href.substr(window.location.href.match(/lang=/).index+5)+"']").attr("selected","selected").siblings().removeAttr("selected"); 2000 $(".videoPopPage .selectedValue").html($(".videoPopPage select").children("option:selected").html()); 2001 } 2002 2003 $(".carousal").on('swipeleft', function(e) { 2004 $(".cPagination .active").next().click(); 2005 }) 2006 .on('swiperight', function(e) { 2007 $(".cPagination .active").prev().click(); 2008 }) 2009 2010 $(".avCarousal").on('swipeleft', function(e) { 2011 $(".rs_pagination .active").next().click(); 2012 }) 2013 .on('swiperight', function(e) { 2014 $(".rs_pagination .active").prev().click(); 2015 }) 2016 2017 $(".iframeThumbs").on('swipeleft', function(e) { 2018 $(".vpagination .active").next().click(); 2019 }) 2020 .on('swiperight', function(e) { 2021 $(".vpagination .active").prev().click(); 2022 }) 2023 2024 /*$(".promoThumbs").on('swipeleft', function(e) { 2025 $(".promoPagination .active").next().click(); 2026 })*/ 2027 .on('swiperight', function(e) { 2028 $(".promoPagination .active").prev().click(); 2029 }) 2030 2031 $(".carousal, .avCarousal, .iframeThumbs").on('movestart', function(e) { 2032 // If the movestart is heading off in an upwards or downwards 2033 // direction, prevent it so that the browser scrolls normally. 2034 if ((e.distX > e.distY && e.distX < -e.distY) || 2035 (e.distX < e.distY && e.distX > -e.distY)) { 2036 e.preventDefault(); 2037 } 2038 }); 2039 2040 2041}); 2042 2043$(window).scroll(function() { 2044 2045 if(this.scrollTO) clearTimeout(this.scrollTO); 2046 this.scrollTO = setTimeout(function() { 2047 $(this).trigger('scrollEnd'); 2048 2049 },100); 2050}); 2051 2052/* 2053 .header ul li a.airtelTop img {width:41px} 2054 .header ul li a.SMJ img {width:77px} 2055 .header ul li a.aqua img {width:42px;} 2056 .header a.star img{ width:73px; margin:17px 0 0 30px;} 2057*/ 2058$(window).bind('scrollEnd', function(){ 2059 if($(".recentUpdates .updatesMaster").css("display")=="block") 2060 { 2061 $(".recentUpdates .updatesMaster").slideUp(); 2062 } 2063 2064 var docScroll = $(document).scrollTop(); 2065 if(docScroll > 0 && !$(".headerMaster").hasClass("fixed") && ($(window).width() > 959)){ 2066 $(".wrapper .headerMaster").addClass("fixed"); 2067 /*$(".wrapper .header ul.logoMaster").animate({top:"-=9px"})*/ 2068 $(".wrapper .header ul li a.airtelTop img").animate({width:"-=60px"}); 2069 $(".wrapper .header ul li a.SMJ img").animate({width:"110px"}); 2070 $(".wrapper .header ul li a.aqua img").animate({width:"-=70px"}); 2071 $(".scrollLinks").fadeIn(); 2072 //$(".wrapper .header a.star img").animate({width:"73px", "margin-top":"17px", "margin-left":"15px", "margin-right":"15px"}); 2073 $(".smjUnit img:first").hide().siblings().show(); 2074 $(".smjUnit").addClass("small"); 2075 $(".hideIt").hide(); 2076 } 2077 else if(docScroll == 0 && $(".headerMaster").hasClass("fixed") && ($(window).width() > 959)){ 2078 $(".wrapper .headerMaster").removeClass("fixed"); 2079 /*$(".wrapper .header ul.logoMaster").animate({top:"+=9px"})*/ 2080 $(".wrapper .header ul li a.airtelTop img").animate({width:"+=60px", marginTop:"0px"}); 2081 $(".wrapper .header ul li a.SMJ img").animate({width:"146px"}); 2082 $(".wrapper .header ul li a.aqua img").animate({width:"+=70px"}); 2083 $(".scrollLinks").fadeOut(); 2084 //$(".wrapper .header a.star img").animate({width:"103px", "margin-top":"0px", "margin-left":"0px", "margin-right":"0px"}); 2085 $(".smjUnit img:first").show().siblings().hide(); 2086 $(".smjUnit").removeClass("small"); 2087 $(".hideIt").show(); 2088 } 2089 2090 2091}); 2092 2093function logoInitiate(){ 2094 if(isiPad == true){ 2095 2096 if($(window).width() < 959){ 2097 $(".headerMaster").removeClass("fixed"); 2098 $(".header ul.logoMaster, .header ul li a.airtelTop img, .header ul li a.SMJ img, .header ul li a.aqua img, .header a.star img").removeAttr("style"); 2099 } 2100 else{ 2101 //$(window).scrollEnd(); 2102 } 2103 }else{ 2104 $(".headerMaster").removeClass("fixed"); 2105 $(".header ul.logoMaster, .header ul li a.airtelTop img, .header ul li a.SMJ img, .header ul li a.aqua img, .header a.star img").removeAttr("style"); 2106 //$(window).scrollEnd(); 2107 } 2108 2109} 2110 2111//function socialSharing(url,i) 2112function socialSharing(url,paramI) 2113{ 2114 var url_new = ""; 2115 2116 var fcnt = "0"; 2117 var tcnt = "0"; 2118
2119 ///////////////////////////////////////// 2120 if ((url.indexOf("rticle.aspx") > -1) || (url.indexOf("atchvideo.aspx") > -1)) { 2121 url_new = url; 2122 // url_new = url_new.replace("Article.aspx", "article.aspx"); 2123 2124 if (url.indexOf("Article.aspx") > -1) 2125 { url_new = url_new.replace("Article.aspx", "article.aspx"); } 2126 else if (url.indexOf("article.aspx") > -1) 2127 { url_new = url_new.replace("article.aspx", "Article.aspx"); } 2128 else if (url.indexOf("watchvideo.aspx") > -1) 2129 { url_new = url_new.replace("watchvideo.aspx", "Watchvideo.aspx"); } 2130 else if (url.indexOf("Watchvideo.aspx") > -1) 2131 { url_new = url_new.replace("Watchvideo.aspx", "watchvideo.aspx"); } 2132 2133 (function (paramI) { // protects i in an immediately called function 2134 $.getJSON("http://graph.facebook.com/?id=" + url_new, function (data) { 2135 if (typeof (data.shares) != "undefined") { 2136 fcnt = data.shares; 2137 } 2138 $.getJSON("http://graph.facebook.com/?id=" + url, function (data) { 2139 if (typeof (data.shares) != "undefined") { 2140 2141 addf = parseInt(data.shares); 2142 } 2143 else { 2144 addf = "0"; 2145 } 2146 //remove comment 2147 2148 addf = parseInt(addf) + parseInt(fcnt); 2149 $(".socials").eq(paramI).children(".fb-share").children("span").text(addf); 2150 }); 2151 }); 2152 })(paramI); 2153 2154 (function (paramI) { // protects i in an immediately called function 2155 $.getJSON("https://cdn.api.twitter.com/1/urls/count.json?url=" + url_new + '&callback=?', function (data) { 2156 tcnt = data.count; 2157 $.getJSON("https://cdn.api.twitter.com/1/urls/count.json?url=" + url + '&callback=?', function (data) { 2158 2159 addt = parseInt(data.count) + parseInt(tcnt); 2160 2161 $(".socials").eq(paramI).children(".tweet-share").children("span").html(addt); 2162 }); 2163 }); 2164 })(paramI); 2165 2166 } 2167 else 2168 { 2169 (function (paramI) { // protects i in an immediately called function 2170 $.getJSON("http://graph.facebook.com/?id=" + url, function (data) { 2171 if (typeof (data.shares) != "undefined") { 2172 fcnt = data.shares; 2173 } 2174 $(".socials").eq(paramI).children(".fb-share").children("span").text(fcnt); 2175 }); 2176 })(paramI); 2177 2178 2179 (function (paramI) { // protects i in an immediately called function 2180 $.getJSON("https://cdn.api.twitter.com/1/urls/count.json?url=" + url + '&callback=?', function (data) { 2181 /*tcnt = data.count; 2182 $.getJSON("https://cdn.api.twitter.com/1/urls/count.json?url=" + url + '&callback=?', function (data) { 2183 2184 addt = parseInt(data.count) + parseInt(tcnt);*/ 2185 2186 $(".socials").eq(paramI).children(".tweet-share").children("span").html(data.count); 2187 /*});*/ 2188 }); 2189 })(paramI); 2190 } 2191 2192 ////////////////////////////////////////////// 2193 2194 var addf = "0"; 2195 var addt = "0"; 2196 2197 /*(function (paramI) { // protects i in an immediately called function 2198 $.getJSON("http://graph.facebook.com/?id=" + url, function (data) { 2199 if (typeof (data.shares) != "undefined") { 2200 2201 addf = parseInt(data.shares); 2202 } 2203 else { 2204 addf = "0"; 2205 } 2206 //remove comment 2207 2208 addf = parseInt(addf) + parseInt(fcnt); 2209 console.log("paramI" + paramI); 2210 $(".socials").eq(paramI).children(".fb-share").children("span").text(addf); 2211 }); 2212 })(paramI);*/ 2213 2214 /*(function (paramI) { // protects i in an immediately called function 2215 $.getJSON("https://cdn.api.twitter.com/1/urls/count.json?url=" + url + '&callback=?', function (data) { 2216 2217 addt = parseInt(data.count) + parseInt(tcnt); 2218 2219 $(".socials").eq(paramI).children(".tweet-share").children("span").html(addt); 2220 }); 2221 2222 2223 })(paramI);*/ 2224 2225 (function(paramI) { // protects i in an immediately called function 2226 $.getJSON(shareHandlerURL+"/Common/handlerSocialCountSum.ashx?URL=" + url, function (data) { 2227 $(".socials").eq(paramI).children(".google-share").children("span").html(data.GooglePlusShares); 2228 $(".socials").eq(paramI).parents(".thisShared").children(".agShare").children("span").eq(1).html(data.TotShare + " shares"); 2229 }); 2230})(paramI); 2231 2232} 2233 2234/* ADs */ 2235 2236function ADjust(){ 2237 var verticalAd1 = $(".section1").offset().left-145; 2238 var verticalAd2 = $(".section1").offset().left+$(".section1").outerWidth(); 2239 2240 $(".verticalAd").eq(0).css({"left":verticalAd1}) 2241 $(".verticalAd").eq(1).css({"left":verticalAd2}) 2242} 2243 2244var vAdsTopPosition = 0; 2245$(function(){ 2246 if($(".verticalAd").length==2){ 2247 vAdsTopPosition = $(".bannerMaster").offset().top + $(".bannerMaster").outerHeight() - $(".headerMaster").outerHeight(); 2248 $(".verticalAd").eq(0).css({"top": $(".bannerMaster").offset().top + $(".bannerMaster").height()}) 2249 $(".verticalAd").eq(1).css({"top": $(".bannerMaster").offset().top + $(".bannerMaster").height()}) 2250 } 2251}); 2252 2253$(window).scroll(function(){ 2254 if($(".verticalAd").is(":visible")){ 2255 if($(document).scrollTop() >
2255= vAdsTopPosition){ 2256 $(".verticalAd").css({position:"fixed", top:$(".headerMaster").outerHeight()}); 2257 } 2258 2259 if($(document).scrollTop() < vAdsTopPosition){ 2260 $(".verticalAd").css({position:"absolute", top: $(".bannerMaster").offset().top + $(".bannerMaster").height()}); 2261 } 2262 } 2263 2264}); 2265 2266var toolTipMsgPosLeft, toolTipMsgPosTop, toolTipMsgElemWidth, toolTipMsgElemHeight; 2267var toolTip={ 2268 show:function(param,paramElemVSpace,mouseXpos){ 2269 toolTipMsgPosLeft=mouseXpos; 2270 toolTipMsgPosTop=$(param).offset().top; 2271 toolTipMsgElemWidth=$(param).width(); 2272 toolTipMsgElemHeight=$(param).height(); 2273 $(".tooltip").children("p").html($(param).attr("rel")); 2274 $(".tooltip").stop(true,true).fadeIn(); 2275 $(".tooltip").css({"top":(toolTipMsgPosTop+paramElemVSpace)+"px","left":(toolTipMsgPosLeft- (($(".tooltip").outerWidth()/2)-10))+"px"}); 2276 }, 2277 hide:function(param){ 2278 $(".tooltip").hide(); 2279 $(".tooltip").children("p").html(''); 2280 } 2281} 2282 2283var leftPosEven=0; 2284var leftPosOdd=320; 2285var topPosEven=0; 2286var topPosOdd=0; 2287var evenIndex, oddIndex; 2288 2289$(function(){ 2290 2291 $(".toolTipMsg").mouseenter(function(e){ 2292 var mousepX = e.pageX;; 2293 toolTip.show(this,20,mousepX); 2294 }); 2295 2296 $(".toolTipMsg").mouseleave(function(){ 2297 toolTip.hide(this); 2298 }); 2299 2300 $(".qasection").each(function(){ 2301 if($(this).index()%2) 2302 { 2303 $(this).css({"left":leftPosOdd+"px","top":topPosEven+"px"}); 2304 $(this).addClass("pNone"); 2305 if($(this).index()!=0) 2306 { 2307 evenIndex=$(this).index(); 2308 topPosEven+=$(".qasection").eq(evenIndex).height(); 2309 } 2310 } 2311 else 2312 { 2313 $(this).css({"left":leftPosEven+"px","top":topPosOdd+"px"}); 2314 if($(this).index()!=1) 2315 { 2316 oddIndex=$(this).index(); 2317 topPosOdd+=$(".qasection").eq(oddIndex).height(); 2318 } 2319 } 2320 }); 2321 2322/* RHS view More Start */ 2323 var relatedNo = $(".article_column_2 .related-article-content-wrapper .related-article-content").length; 2324 console.log(relatedNo) 2325 if(relatedNo > 3){ 2326 $(".ViewMore").show(); 2327 $(".article_column_2 .related-article-content-wrapper .related-article-content").slice(3,$(".article_column_2 .related-article-content-wrapper .related-article-content").length).addClass("toShow").hide(); 2328 2329 $(".ViewMore").click(function(){ 2330 $(".toShow").toggleClass("doShow").slideToggle(); 2331 2332 if($(".toShow").hasClass("doShow")){ 2333 $(this).text("View Less -") 2334 $("html,body").animate({scrollTop:$(".article_column_2 .related-article-content-wrapper .related-article-content").eq(3).offset().top-130},800); 2335 } 2336 else{ 2337 $(this).text("View More +") 2338 $("html,body").animate({scrollTop:$(".article_column_2 .related-article-content-wrapper .related-article-content").eq(2).offset().top-130},800); 2339 } 2340 }); 2341 } 2342/* RHS view More End */ 2343$(".subscribe a").click(function(){ 2344 $(".SubscribeBox").removeClass("msg"); 2345 $(".succesMsg").hide(); 2346 $(".SubscribeBox").show(); 2347 $(".blackBox.SubscribeBox .inputBox, .blackBox.SubscribeBox .buttonBox").show(); 2348 2349 }); 2350}); 2351 2352if (isiPhone || isAndroid || isWindowsPhone || isiPad) { 2353 window.addEventListener("orientationchange", function() { 2354 if($(".promoArrow").is(":visible")){ 2355 $(".promoArrow").click(); 2356 } 2357 }, false); 2358} 2359 2360function subcribediv(){ 2361 $(".SubscribeBox").show(); 2362 $(".blackBox.SubscribeBox .inputBox, .blackBox.SubscribeBox .buttonBox").hide(); 2363 $(".SubscribeBox").addClass("msg"); 2364 setTimeout(function() {$(".SubscribeBox").hide()},3000) 2365} 2366 2367 2368/*doubleBoxInnerBox:start*/ 2369$(function(){ 2370 var innerBoxLeftPosEven=0; 2371 var innerBoxLeftPosOdd=289; 2372 var innerBoxTopPosEven=0; 2373 var innerBoxTopPosOdd=0; 2374 var innerBoxEvenIndex, innerBoxOddIndex; 2375 var leftColHeight=0; 2376 var boxCtr=0; 2377 2378 $(".doubleBoxInnerBox").each(function(){ 2379 if(boxCtr==0) 2380 { 2381 boxCtr+=1; 2382 } 2383 else if(boxCtr==1) 2384 { 2385 $(this).addClass("lightGray"); 2386 boxCtr+=1; 2387 } 2388 else if(boxCtr==2) 2389 { 2390 $(this).addClass("darkGray"); 2391 boxCtr=0; 2392 } 2393 2394 if($(this).index()%2) 2395 { 2396 innerBoxTopPosEven+=20; 2397 $(this).css({"left":innerBoxLeftPosOdd+"px","top":innerBoxTopPosEven+"px"}); 2398 $(this).addClass("rightBox"); 2399 if($(this).index()!=0) 2400 { 2401 innerBoxEvenIndex=$(this).index(); 2402 innerBoxTopPosEven+=$(".doubleBoxInnerBox").eq(innerBoxEvenIndex).height(); 2403 } 2404 } 2405 else 2406 { 2407 innerBoxTopPosOdd+=20; 2408 $(this).css({"left":innerBoxLeftPosEven+"px","top":innerBoxTopPosOdd+"px"}); 2409 if($(this).index()!=1) 2410 { 2411 innerBoxOddIndex=$(this).index(); 2412 innerBoxTopPosOdd+=$(".doubleBoxInnerBox").eq(innerBoxOddIndex).height(); 2413 } 2414 } 2415 }).promise().done(function(){ 2416 innerBoxTopPosEven<innerBoxTopPosOdd ? $(".doubleBox").css("height",innerBoxTopPosOdd+30+"px") : $(".doubleBox").css("height",innerBoxTopPosEven+30+"px"); 2417 }); 2418 2419 2420 /* @25Aug2014 For Aakash Logo Hide Start*/ 2421 $(".lSection .logos" ).last().hide(); 2422 /* @25Aug2014 For Aakash Logo Hide End*/ 2423}); 2424/*doubleBoxInnerBox:end*/ 2425
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.