1/* Global Variables */ 2 3var $capslide_img_cont = $('#capslide_img_cont'); 4var $tabs = $('.tabbable li'); 5var $carousel = $("#carousel"); 6/* Document Ready Function */ 7$( window ).resize(function() { 8 //debugger 9 if ($(window).width() <= 767) { 10 11 if($(".side-panel-desktop").html()!=""){ 12 $(".side-panel-mobile").html($(".side-panel-desktop").html()); 13 $(".side-panel-desktop").html(""); 14 } 15 16 /*$("#specialityBlock").addClass("d-none"); 17 $("#specialityBtnMob").click(function(){ 18 if($("#specialityBlock").hasClass('d-none')){ 19 $("#specialityBlock").addClass("d-block"); 20 $("#specialityBlock").removeClass("d-none"); 21 }else{ 22 $("#specialityBlock").addClass("d-none"); 23 $("#specialityBlock").removeClass("d-block"); 24 } 25 }); 26// $("#specialityBtnMob").click(function(){ 27// $("#specialityBlock").slideToggle("slow"); 28// }); 29 if($(".side-panel-desktop").html()!=""){ 30 $(".side-panel-mobile").html($(".side-panel-desktop").html()); 31 $(".side-panel-desktop").html(""); 32 }*/ 33 34 }else{ 35 if($(".side-panel-mobile").html()!=""){ 36 $(".side-panel-desktop").html($(".side-panel-mobile").html()); 37 $(".side-panel-mobile").html(""); 38 } 39 } 40}); 41 42$(document).ready(function() { 43 if($(window).width() <768){ 44 $("#specialityBlock").addClass("d-none"); 45 } 46 $("#specialityBtnMob").on("click", function(){ 47 if($("#specialityBlock").hasClass('d-none')){ 48 $("#specialityBlock").removeClass("d-none").addClass("d-block"); 49 }else{ 50 $("#specialityBlock").removeClass("d-block").addClass("d-none"); 51 } 52 }); 53 54 if($(window).width() <= 767){ 55 if($(".side-panel-desktop").html()!=""){ 56 $(".side-panel-mobile").html($(".side-panel-desktop").html()); 57 $(".side-panel-desktop").html(""); 58 } 59 }else{ 60 if($(".side-panel-mobile").html()!=""){ 61 $(".side-panel-desktop").html($(".side-panel-mobile").html()); 62 $(".side-panel-mobile").html(""); 63 } 64 65 } 66 67 $('input').attr("autocomplete", "off"); 68 69 //for click anywhere collapse drop down navigation in mobile function for main resolution dropdown open on hover 70 $('ul.nav li.dropdown').hover(function() { 71 $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); 72 }, function() { 73 $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); 74 }); 75 //var x = "Cookies Enabled: " + navigator.cookieEnabled; 76 77 //function for mob resolution change icon and add class in li 78 //for navigation in mobile=========================================== 79 $('.mobNavigation').click(function() { 80 if ($('#mobSearch').hasClass('in')) { 81 $('#mobSearch').removeClass('in') 82 $('.mobSearchBtn').find('i').removeClass('fa-times'); 83 $('.mobSearchBtn').find('i').addClass('fa-search'); 84 } 85 86 $('#hamburgerUserMenu').hide(); 87 if ($('#hamburgerUserMenu').parent().hasClass('activeli')) { 88 $('#hamburgerUserMenu').parent().removeClass('activeli'); 89 $('#hamburgerUserMenu').parent().removeClass('fa-times'); 90 $('#hamburgerUserMenu').parent().addClass('fa-user'); 91 } else{ 92 $('.userNav').find('i').removeClass('fa-times'); 93 $('.userNav').find('i').addClass('fa-user'); 94 } 95 96 if ($(this).closest('li').hasClass('activeli')) { 97 $(this).closest('li').removeClass('activeli'); 98 $(this).find('i').removeClass('fa-times'); 99 $(this).find('i').addClass('fa-bars'); 100 } else { 101 $(this).closest('li').addClass('activeli'); 102 $(this).find('i').removeClass('fa-bars'); 103 $(this).find('i').addClass('fa-times'); 104 } 105 $('#hamburgerNavMenu').toggle(); 106 107 $(this).closest('li').siblings().removeClass('activeli'); 108 }); 109 110 //for user drop down navigation in mobile=============================== 111 $('.userNav').click(function() { 112 if ($('#mobSearch').hasClass('in')) { 113 $('#mobSearch').removeClass('in') 114 $('.mobSearchBtn').find('i').removeClass('fa-times'); 115 $('.mobSearchBtn').find('i').addClass('fa-search'); 116 } 117 118 $('#hamburgerNavMenu').hide(); 119 if ($('#hamburgerNavMenu').parent().hasClass('activeli')) { 120 $('#hamburgerNavMenu').parent().removeClass('activeli'); 121 $('#hamburgerNavMenu').parent().removeClass('fa-times'); 122 $('#hamburgerNavMenu').parent().addClass('fa-bars'); 123 } else{ 124 $('.mobMainNav').find('i').removeClass('fa-times'); 125 $('.mobMainNav').find('i').addClass('fa-bars'); 126 } 127 128 if ($(this).closest('li').hasClass('activeli')) { 129 $(this).closest('li').removeClass('activeli'); 130 $(this).find('i').removeClass('fa-times'); 131 $(this).find('i').addClass('fa-user'); 132 } else { 133 $(this).closest('li').addClass('activeli'); 134 $(this).find('i').removeClass('fa-user'); 135 $(this).find('i').addClass('fa-times'); 136 }
137 $('#hamburgerUserMenu').toggle(); 138 139 $(this).closest('li').siblings().removeClass('activeli'); 140 }); 141 142 //for Search bar in mobile========================================== 143 $('.mobSearchBtn').click(function() { 144 $('#hamburgerNavMenu').hide(); 145 $('#hamburgerUserMenu').hide(); 146 if ($('.mobNavigation ').closest('li').hasClass('activeli') || $('.mobMyAccount ').closest('li').hasClass('activeli')) { 147 $('.userNav').find('i').removeClass('fa-times'); 148 $('.userNav').find('i').addClass('fa-user'); 149 $('.mobNavigation').find('i').removeClass('fa-times'); 150 $('.mobNavigation').find('i').addClass('fa-bars'); 151 } 152 153 if ($(this).closest('li').hasClass('activeli')) { 154 $(this).closest('li').removeClass('activeli'); 155 $(this).find('i').removeClass('fa-times'); 156 $(this).find('i').addClass('fa-search'); 157 } else { 158 $(this).closest('li').addClass('activeli'); 159 $(this).find('i').removeClass('fa-search'); 160 $(this).find('i').addClass('fa-times'); 161 } 162 $(this).closest('li').siblings().removeClass('activeli'); 163 }); 164 //End of the js for navigation======================== 165 166 /* RESPONSIVE COLLAPSE BUTTON */ 167 168 $('#mobnav-btn').click(function() { 169 $('#cbp-hrmenu').toggleClass("xactive"); 170 }); 171 172 $(function() { 173 $("#Subscribe_email").hide(); 174 $("#inlineCheckbox1").click(function() { 175 $("#Subscribe_email").slideToggle("slow"); 176 }); 177 $("#Subscribe_email").hide(); 178 }); 179 180 /** 181 * ****************************TOOLTIP FOR SECURE CHECKOUT PAGE TAX 182 * LINK***************************** 183 */ 184 $("#tax, #searchTip").mouseover(function() { 185 $("#tax, #searchTip").tooltip('show'); 186 }); 187 188 /** 189 * ****************************RIBBON TOOLTIP FOR SUBSCRIPTION 190 * PAGE***************************** 191 */ 192 $("#ribbon_tip").tooltip({ "trigger" : "hover", "placement" : "top", "html" : "true" }); 193 194 /** 195 * ****************************TERMS & CONDITIONS 196 * CHECK***************************** 197 */ 198 $("#makePayment").click(function() { 199 $(this).submit(); 200 /*if ($(".termsConditions").find("input[type='checkbox']").filter(":checked").length >= 1) { 201 $(this).submit(); 202 } else { 203 $(".terms").css("display", "block"); 204 return false; 205 }*/ 206 }); 207 $('.nextIcon').mouseenter(function() { 208 $(".nextDescription").show(); 209 }).mouseleave(function() { 210 $(".nextDescription").hide(); 211 }); 212 $('.prevIcon').mouseenter(function() { 213 $(".prevDescription").show(); 214 }).mouseleave(function() { 215 $(".prevDescription").hide(); 216 }); 217 218 /** ****************************COLLAPSE**************************** */ 219 220 $.fn.nodeElement = function(options) { 221 var settings = $.extend({ display : "none", height : 'toggle' }, options); 222 return this.parent().next().children(".tp_grayBgContainer").animate({ display : settings.display, height : 'toggle' }); 223 }; 224 225 /** 226 * ****************************SECURE CHECKOUT - BILLING INFORMATION 227 * COLLAPSE CODE***************************** 228 */ 229 230 $('#nextStep').on('click', function() { 231 $tabs.filter('.active').next('li').find('a[data-toggle="tab"]').tab('show'); 232 }); 233 234 if ($(".termsConditions").find("input[type='checkbox']").filter(":checked").length >= 1) { 235 $(".Check").css("display", "block"); 236 $(".notCheck").css("display", "none"); 237 } else { 238 $(".notCheck").css("display", "block"); 239 $(".Check").css("display", "none"); 240 } 241 242 $("#pane2").on("click", "a", function() { 243 $(this).hasClass("tp_down_blue_arrow") ? $(this).removeClass("tp_down_blue_arrow").addClass("tp_up_blue_arrow").nodeElement({ display : "block" }) : $(this).removeClass("tp_up_blue_arrow").addClass("tp_down_blue_arrow").nodeElement({ display : "block" }); 244 }); 245 246 /** 247 * ****************************SUBSCRIPTION PAGE COUNTRY LIST MODAL 248 * FUNCTION***************************** 249 */ 250 251 $("#countryList").change(function() { 252 location.href = $(this).val(); 253 }); 254 255 /** 256 * ****************************PAGINATION COMPONENT FOR SUBJECT 257 * A-Z***************************** 258 */ 259 $("#subList li:first").addClass("active"); 260 $("#subList li a").click(function() { 261 $("#subList").children().removeClass("active"); 262 var subAlphabets = $(this).text().toUpperCase(); 263 var subAlphasbetsURL = "/subjectCategoryBrowse?id=" + subAlphabets; 264 if (subAlphabets != "ALL") { 265 $("#allSubjects").hide(); 266 $("#subjectListData").load(subAlphasbetsURL + ' #content'); 267 $(this).parent().addClass("active"); 268 } 269 }); 270 271 /** 272 * ****************************SUBJECT 273 * CATEGORIES***************************** 274 */ 275 $(".css-treeview input:checkbox").click(function() { 276 if ($(this).is(":checked")) { 277 var group = "input:checkbox[name='" + $(this).attr("name") + "']"; 278 $(group).prop("checked", false); 279 $(this).prop("checked", true); 280 } else { 281 $(this).prop("checked", false); 282 } 283 }); 284 285 /** ****************************SEARCH**************************** */ 286 287 $("#searchArtType").change(function() { 288 var articleType = $(this).val(); 289 var journalType = $("#searchJourType").val(); 290 var dateType = $("#searchDateType").val(); 291 292 if (articleType != null) { 293 if (journalType != null && dateType != null) { 294 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType + "&journalType=" + journalType + "&dateType=" + dateType; 295 } else if (journalType != null) { 296 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType + "&journalType=" + journalType; 297 } else if (dateType != null) { 298 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType + "&dateType=" + dateType; 299 } else { 300 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType; 301 } 302 } 303 304 $("#allResult").hide(); 305 $("#filteredResult").load(subAlphasbetsURL + ' #content'); 306 307 }); 308 309 $("#searchJourType").change(function() { 310 var articleType = $("#searchArtType").val(); 311 var journalType = $(this).val(); 312 var dateType = $("#searchDateType").val(); 313 314 if (journalType != null) { 315 if (articleType != null && dateType != null) { 316 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType + "&journalType=" + journalType + "&dateType=" + dateType; 317 } else if (articleType != null) { 318 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType + "&journalType=" + journalType; 319 } else if (dateType != null) { 320 var subAlphasbetsURL = "/searchBrowse?journalType=" + journalType + "&dateType=" + dateType; 321 } else { 322 var subAlphasbetsURL = "/searchBrowse?journalType=" + journalType; 323 } 324 } 325 326 $("#allResult").hide(); 327 $("#filteredResult").load(subAlphasbetsURL + ' #content'); 328 329 }); 330 331 $("#searchDateType").change(function() { 332 var articleType = $("#searchArtType").val(); 333 var journalType = $("#searchJourType").val(); 334 var dateType = $(this).val(); 335 336 if (dateType != null) { 337 if (articleType != null && journalType != null) { 338 var subAlphasbetsURL = "/searchBrowse?articleType=" + articleType + "&journalType=" + journalType + "&dateType=" + dateType; 339 } else if (journalType != null) { 340 var subAlphasbetsURL = "/searchBrowse?dateType=" + dateType + "&journalType=" + journalType; 341 } else if (articleType != null) { 342 var subAlphasbetsURL = "/searchBrowse?dateType=" + dateType + "&articleType=" + articleType; 343 } else { 344 var subAlphasbetsURL = "/searchBrowse?dateType=" + dateType; 345 } 346 } 347 348 $("#allResult").hide(); 349 $("#filteredResult").load(subAlphasbetsURL + ' #content'); 350 351 }); 352 353 /** 354 * ****************************SERVICE ACCORDION FOR 355 * HOME**************************** 356 */ 357 358 $("#serviceAccordion").on('click', 'a', function(e) { 359 if ($(this).parents('.accordion-group').children('.accordion-body').hasClass('in')) { 360 e.stopPropagation(); 361 } 362 }); 363 var my_colors = [ 364 "#666699", "#6699cc", "#66cc66", "#cccc66" 365 ]; 366 $(".tp_accordion-heading").find("a").each(function(i) { 367 $(this).parent().parent().css("background-color", my_colors[i]); 368 }); 369 370 /** ****************************ELASTISLIDE**************************** */ 371 if ($carousel.length > 0) { 372 $('#carousel').elastislide(); 373 } 374 $(".tp_orderNo").on("click", ajaxCall); 375 function ajaxCall(e) { 376 var abcd = $(this).html(); 377 e.preventDefault(); 378 // alert('showOrderDetail?orderId='+abcd); 379 $.ajax({ url : "/showOrderDetail?orderNo=" + abcd, 380 // data: html, 381 type : "POST", success : function(data) { 382 // alert(data); 383 $('#orderDetail').modal('show'); 384 } }); 385 } 386 387 $("#newletter2").hide(); 388 $("#newslettercontent").hide(); 389 390 $(".button-hide-tab").click(function() { 391 $(".hide-tab-print").addClass("non-printable"); 392 $(".hide-tab-print").removeClass("tab-pane-print"); 393 }); 394 $(".button-show-tab").click(function() { 395 $(".hide-tab-print").addClass("tab-pane-print"); 396 $(".hide-tab-print").removeClass("non-printable"); 397 }); 398 399 /* var expires; 400 var name = 'complianceCookie'; // Name of our cookie 401 var value = 'on'; 402 403 var checkCookieValue=checkCookie(name); 404 if(checkCookieValue!=value) 405 { 406 $("#sliding-popup").show(); 407 var date = new Date(); 408 date.setDate(date.getDate() + 100); 409 expires = "; expires=" + date.toGMTString(); 410 411 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; 412 }*/ 413/* var shown= localStorage.getItem('isshow'); 414 if(shown !="t"){ 415 $('#jPopup').show(); 416 localStorage.setItem('isshow', "t"); 417 }*/ 418 419 // Citation Button By Default Disabled if not chosen any citation format 420 $("#citationFormatDwnldBtn").attr("disabled", 'disabled'); 421 422 var pageURL = $(location).attr("href").split("//").pop().split("/")[0]; 423 var appStaticUrl = $("#appUrl").val(); 424 if(pageURL == appStaticUrl){ 425 $("#jobDiv").css("display", "block"); 426 } 427 428 $(".srchBtn").attr('disabled','disabled'); 429 430 // Help Modal 431 432 $("#helpModalLink").click(function(){ 433 $("#btns1").css("display", "block"); 434 $("#msg1").html("").css("display", "none"); 435 $("#needHelp")[0].reset(); 436 $('#helpName').css('border', '1px solid #CCCCCC'); 437 $("#helpNameError").html(''); 438 $('#helpMessage').css('border', '1px solid #CCCCCC'); 439 $("#helpMessageError").html(''); 440 $('#helpEmail').css('border', '1px solid #CCCCCC'); 441 $("#helpEmailError").html(''); 442 $("#helpModal").modal("toggle"); 443 }); 444 445 $("#needHelp").on('submit', (function(e) { 446 447 var error = 0; 448 449 if($("#helpName").val() == ''){ 450 $("#helpNameError").html('Name is required').css('color', 'red'); 451 $('#helpName').attr('style','border: 1px solid red;'); 452 error = 1; 453 } else { 454 $('#helpName').css('border', '1px solid #CCCCCC'); 455 $("#helpNameError").html(''); 456 } 457 458 if($("#helpMessage").val() == ''){ 459 $("#helpMessageError").html('Message is required').css('color', 'red'); 460 $('#helpMessage').attr('style','border: 1px solid red;'); 461 error = 1; 462 } else { 463 $('#helpMessage').css('border', '1px solid #CCCCCC'); 464 $("#helpMessageError").html(''); 465 } 466 467 if($("#helpEmail").val() == ''){ 468 $("#helpEmailError").html('Email is required').css('color', 'red'); 469 $('#helpEmail').attr('style','border: 1px solid red;'); 470 error = 1; 471 } else { 472 if(!isValidEmailAddress($("#helpEmail").val())){ 473 $("#helpEmailError").html("Please enter valid email address").css('color', 'red'); 474 $('#helpEmail').css('border', '1px solid red'); 475 error = 1; 476 }else{ 477 $('#helpEmail').css('border', '1px solid #CCCCCC'); 478 $("#helpEmailError").html(''); 479 } 480 } 481 482 if(error == 0){ 483 $("#pageLoder").show(); 484 e.preventDefault(); 485 $.ajax({ url : "/needHelp", type : "POST", data : new FormData(this), contentType : false, cache : false, processData : false, success : function(data) { 486 console.log("Need Help success : " + data.ajaxResponse); 487 if(data.ajaxResponse == "Successful"){ 488 $("#pageLoder").hide(); 489 $("#needHelp")[0].reset(); 490 $("#btns1").css("display", "none");
491 $("#msg1").html("Thank you!!!").css("display", "block"); 492 } else { 493 $("#msg1").html("Error Occurred please try again"); 494 } 495 } }); 496 }else { 497 return false; 498 } 499 500 })); 501 502 $("#needHelp").on('reset', (function(e) { 503 $('.fileLabel').html("Choose file"); 504 $("#needHelp")[0].reset(); 505 })); 506 507 // FeedBack Modal 508 509 $("#feedback").on('reset', (function(e) { 510 $('#feedBackName').css('border', '1px solid #CCCCCC'); 511 $("#feedBackNameError").html(''); 512 $('#feedBackMsg').css('border', '1px solid #CCCCCC'); 513 $("#feedBackMsgError").html(''); 514 $('#feedBackEmail').css('border', '1px solid #CCCCCC'); 515 $("#feedBackEmailError").html(''); 516 $("#feedBackRatingError").html(''); 517 })); 518 519 $(".feedbackModal").click(function(){ 520 $("#btns").css("display", "block"); 521 $("#msg").html("").css("display", "none"); 522 $("#feedback")[0].reset(); 523 524 $('#feedBackName').css('border', '1px solid #CCCCCC'); 525 $("#feedBackNameError").html(''); 526 $('#feedBackMsg').css('border', '1px solid #CCCCCC'); 527 $("#feedBackMsgError").html(''); 528 $('#feedBackEmail').css('border', '1px solid #CCCCCC'); 529 $("#feedBackEmailError").html(''); 530 $("#feedBackRatingError").html(''); 531 532 $("#feedbackModal").modal("toggle"); 533 }); 534 535 $("#feedback").on('submit', (function(e) { 536 537 var error = 0; 538 539 if($("#feedBackName").val() == ''){ 540 $("#feedBackNameError").html('Name is required').css('color', 'red'); 541 $('#feedBackName').attr('style','border: 1px solid red;'); 542 error = 1; 543 } else { 544 $('#feedBackName').css('border', '1px solid #CCCCCC'); 545 $("#feedBackNameError").html(''); 546 } 547 548 if($("#feedBackMsg").val() == ''){ 549 $("#feedBackMsgError").html('Feedback is required').css('color', 'red'); 550 $('#feedBackMsg').attr('style','border: 1px solid red;'); 551 error = 1; 552 } else { 553 $('#feedBackMsg').css('border', '1px solid #CCCCCC'); 554 $("#feedBackMsgError").html(''); 555 } 556 557 if($("#feedBackEmail").val() == ''){ 558 $("#feedBackEmailError").html('Email is required').css('color', 'red'); 559 $('#feedBackEmail').attr('style','border: 1px solid red;'); 560 error = 1; 561 } else { 562 if(!isValidEmailAddress($("#feedBackEmail").val())){ 563 $("#feedBackEmailError").html("Please enter valid email address").css('color', 'red'); 564 $('#feedBackEmail').css('border', '1px solid red'); 565 error = 1; 566 }else{ 567 $('#feedBackEmail').css('border', '1px solid #CCCCCC'); 568 $("#feedBackEmailError").html(''); 569 } 570 } 571 572 /*if ($('[name="inlineRadioOptions"]:checked').length == 0) { 573 $("#feedBackRatingError").html("Rating is required").css('color', 'red'); 574 error = 1; 575 } else { 576 577 }*/ 578 579 if (error == 0) { 580 $("#pageLoder").show(); 581 e.preventDefault(); 582 //$("#pageLoder").show(); 583 $.ajax({ url : "/feedback", type : "POST", data : new FormData(this), contentType : false, cache : false, processData : false, success : function(data) { 584 if(data.ajaxResponse == "Successful"){ 585 $("#pageLoder").hide(); 586 $("#feedback")[0].reset(); 587 $("#btns").css("display", "none"); 588 $("#msg").html("Thank you!!!").css("display", "block"); 589 } else { 590 $("#msg").html("Error Occurred please try again"); 591 } 592 } }); 593 } else { 594 return false; 595 } 596 })); 597 598 $("#feedback").on('reset', (function(e) { 599 $("#feedback")[0].reset(); 600 })); 601 602}); 603 604function ValidateEmail(email) { 605 var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; 606 return expr.test(email); 607}; 608 609/*$("#userNewsletter").click(function(event) { 610 611 if ($("#newsletterName").val() == "") { 612 alert("ERROR:Please Enter Your Name"); 613 } 614 var user = $("#newsletterName").val(); 615 616 if (!!user) { 617 event.preventDefault(); 618 $("#newletter1").hide(); 619 $("#newletter2").show(); 620 $("#emailNewsletter").click(function(e) { 621 var email = $("#newsletterEmail").val(); 622 if ($("#newsletterEmail").val() == "" || !ValidateEmail($("#newsletterEmail").val())) { 623 $("#newletter2").show(); 624 } else { 625 $.ajax({
626 url : "newsletter?newsletterName=" + user + "&newsletterEmail=" + email, 627 async : true, 628 success : function(data) { 629 $("#newslettercontent").html("<br><font style='color:white'>" + data + "</font>"); 630 631 } 632 }); 633 634 $("#newletter2").hide(); 635 $("#newslettercontent").show(); 636 e.preventDefault(); 637 } 638 639 }); 640 } 641 642});*/ 643 644$("body").on("click","#emailNewsletter",function(e) { 645 var error=0; 646 var email = $("body").find("#newsletterEmail").val(); 647 if ($("body").find("#newsletterEmail").val() == "" ) { 648 649 $("body").find("#newsletterEmailError").html('email is required').css('color', 'red'); 650 $("body").find('#newsletterEmail').attr('style','border: 1px solid red;'); 651 error = 1; 652 } else if (!ValidateEmail($("body").find("#newsletterEmail").val())) { 653 $("body").find("#newsletterEmailError").html('Enter valid email id').css('color', 'red'); 654 $("body").find('#newsletterEmail').attr('style','border: 1px solid red;'); 655 error = 1; 656 } else { 657 $("body").find("#newsletterEmailError").html(''); 658 $("body").find('#newsletterEmail').css('border', '1px solid #CCCCCC'); 659 } 660 if(error == 0){ 661 662 e.preventDefault(); 663 var isCiplaUser = $("#isCiplaUser").val(); 664 var newsletterurl = ""; 665 if(isCiplaUser == 'Y'){ 666 667 newsletterurl = "/ciplanewsletter?newsletterEmail=" 668 }else{ 669 newsletterurl = "/newsletter?newsletterEmail=" 670 } 671 672 $.ajax({ url : newsletterurl + email, async : true, success : function(data) { 673 $("body").find("#newslettercontent").html("" + data + "").css('opacity','1'); 674 //$("#newsletterEmail").val(''); 675 } }); 676 677 $("body").find("#register-newsletter-next")[0].reset(); 678 $("body").find("#newslettercontent").show(); 679 680 window.setTimeout(function() { 681 $("body").find("#newslettercontent").fadeTo(500, 0).slideUp(500, function(){ 682 $("body").find("#newslettercontent").hide() 683 }); 684 }, 3000); 685 e.preventDefault(); 686 } 687 688}); 689 690 691 692$(".editorial-info p a").click(function() { 693 var editorId = $(this).attr('id'); 694 var subURL = "/editorDetail?editorId=" + editorId; 695 $(".editorial-info").hide(); 696 $(".editorial-content").load(subURL + ' .editorial-detail'); 697 698}); 699 700function backToEditorial() { 701 $(".editorial-info").show(); 702 $(".editorial-detail").hide(); 703} 704 705$("#swc").keypress(function(event) { 706 var keycode = (event.keyCode ? event.keyCode : event.which); 707 if (keycode == '13') { 708 var searchTerm = $("#swc").val(); 709 var jCode = $("#jCode").val(); 710 var jid = $("#jid").val(); 711 /* 712 * var subURL = 713 * "/publicationArticles?jCode="+jCode+"&searchTerm="+searchTerm+"&jid="+jid; 714 * $("#resw").hide(); $("#cntnt").load(subURL + ' .searc'); 715 */ 716 window.location.href = "/publicationArticles?jCode=" + jCode + "&searchTerm=" + searchTerm + "&jid=" + jid; 717 } 718}); 719 720$("#fulltextbtn").click(function(){ 721 $("#abstracttab").hide(); 722 $("#fullTexttab").show(); 723 $('html, body').animate({'scrollTop' : $(".inner-article").offset().top}, 20); 724}); 725$(".abstractbtn").click(function(){ 726 $("#fullTexttab").hide(); 727 $("#abstracttab").show(); 728 $('html, body').animate({'scrollTop' : $(".inner-article").offset().top}, 20); 729}); 730$(window).on("load", function() { 731 setTimeout(function() { 732 $('.flex-caption1').css('height', $(".bannerImage").height() + 'px'); 733 }, 100); 734}); 735$(window).resize(function() { 736 setTimeout(function() { 737 $('.flex-caption1').css('height', $(".bannerImage").height() + 'px'); 738 }, 100); 739}); 740 741$(".tab_drawer_heading ").click(function() { 742 743 setTimeout(function() { 744 $('html, body').animate({ 'scrollTop' : $(".d_active").offset().top }, 0); 745 746 }, 50); 747 748}); 749 750$("#selectCountryboxid").click(function() { 751 $.ajax({ url : "/institutelist?countryid=" + $(this).val(), success : function(data) { 752 // console.log(data.instituteList); 753 var html1 = '<div class="mar-bot-15"><ul>' 754 $.each(data.instituteList, function(index, value) { 755 /* html1 += '<li><a href="/search/author/'+value.openAthensId+'">'+value.instituteName+'</a></li>';*/ 756 var target=$("#target").val(); 757 758 html1 += '<li class="col-md-6 col-sm-6">
758<a href="/action/ssostart?entityID='+value.shibbolethEntityId+'&target='+target+'"; class="rss-feeds-link">'+value.instituteName+'</a></li>'; 759 760 }); 761 html1 += '</ul></div>'; 762 $('#listshibdinstitute').html(html1); 763 } }); 764}); 765 766$('#searchKeyword').click(function(event){ 767 /*var keycode = (event.keyCode ? event.keyCode : event.which); 768 if(keycode == '13'){*/ 769 770 $.ajax({ 771 772 url : "/institutelistByKeyword?instituteName=" + $("#searchInstitute").val(), success : function(data) { 773 // console.log(data.instituteList); 774 var html1 = '<div class="mar-bot-15"><ul>' 775 $.each(data.instituteList, function(index, value) { 776 /* html1 += '<li><a href="/search/author/'+value.openAthensId+'">'+value.instituteName+'</a></li>';*/ 777 var target=$("#target").val(); 778 779 html1 += '<li class="col-md-6 col-sm-6"><a href="/action/ssostart?entityID='+value.shibbolethEntityId+'&target='+target+'"; class="rss-feeds-link">'+value.instituteName+'</a></li>'; 780 781 }); 782 html1 += '</ul></div>'; 783 $('#listshibdinstitute').html(html1); 784 } }); 785 //} 786 event.stopPropagation(); 787}); 788 789$("#social-fb").click(function() { 790 var facebookWindow = window.open('https://facebook.com/sharer.php?u=' + document.URL, 'facebook-popup', 'height=350,width=600'); 791 if (facebookWindow.focus) { 792 facebookWindow.focus(); 793 } 794 return false; 795 796 }); 797/*$("#social-gp").click(function() { 798 var googleWindow = window.open('https://plus.google.com/share?url=' + document.URL, 'google-popup', 'height=350,width=600'); 799 if (googleWindow.focus) { 800 googleWindow.focus(); 801 } 802 return false; 803 804});*/ 805 806 $("#social-gp").click(function(){ 807 var instagramWindow = window.open('https://www.instagram.com/share?url=' + document.URL, 'instagram-popup', 'height=350,width=600'); 808 if (instagramWindow.focus) { 809 instagramWindow.focus(); 810 } 811 return false; 812 813 }); 814 815 $("#social-tw").click(function(){ 816 817 var twitterWindow = window.open('https://twitter.com/share?url=' + document.URL, 'twitter-popup', 'height=350,width=600'); 818 if (twitterWindow.focus) { 819 twitterWindow.focus(); 820 } 821 return false; 822 823}); 824 825$("#social-li").click(function() { 826 827 var linkedinWindow = window.open('https://www.linkedin.com/share?url=' + document.URL, 'linkedin-popup', 'height=350,width=600'); 828 if (linkedinWindow.focus) { 829 linkedinWindow.focus(); 830 } 831 return false; 832 833}); 834 835$("#journal_news").change(function() { 836 var formAction = "/newsFeature/" + $(this).val(); 837 $("#journal_news_form").attr("action", formAction); 838 $("#journal_news_form").submit(); 839}); 840 841$("#citationFormat").change(function() { 842 var formAction = $(this).val(); 843 if(formAction == 0){ 844 $("#citationFormatDwnldBtn").attr("disabled", 'disabled'); 845 }else{ 846 $("#citationFormatDwnldBtn").removeAttr("disabled"); 847 } 848}); 849 850 851$("#myHref").on('click', function() { 852 853 var searchKeyword = document.getElementById('searchTerm').value; 854 if (searchKeyword != "" ) { 855 var link = "/searchAction?&searchTerm=" + encodeURIComponent($("#searchTerm").val()); 856 857 window.location.href = link; 858 } else { 859 $("#searchTerm").attr('required', 'required'); 860 $("button[type='submit']").trigger('click') 861 document.getElementById("searchTerm").focus(); 862 } 863}); 864 865 866$("#searchInAllChapter").on('click', function() { 867 868 var searchKeyword = document.getElementById('searchTerm').value; 869 if (searchKeyword != "" ) { 870 if($("#bCode").val() != null || $("#bCode").val() != undefined){ 871 var searchAction = "/searchAction?bCode="+$("#bCode").val() + "&searchTerm=" + encodeURIComponent($("#searchTerm").val()); 872 }else{ 873 var searchAction = "/searchAction?searchTerm=" + encodeURIComponent($("#searchTerm").val()) ; 874 } 875 window.open(searchAction, '_blank'); 876 877 } else { 878 $("#searchTerm").attr('required', true); 879 document.getElementById("searchTerm").focus(); 880 } 881}); 882 883 884 885$(".documentSearch a").click(function(){ 886 var selText = $(this).text(); 887 $('input[name=searchTypeFlag]').val(selText); 888 $(this).parents('.search-group').find('.dropdown-toggle').html(selText+' <span class="caret"></span>'); 889 }); 890 891 892function isValidEmailAddress(emailAddress) { 893 var pattern = /^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i; 894 return pattern.test(emailAddress); 895}; 896 897$('#openMedicalDictionary').off('click'); 898 899 900$('#openMedicalDictionary').click(function () { 901 var searchword = document.getElementById("searchTerm").value.trim(); 902 if (searchword !== "") { 903 var frameSrc = "https://medical-dictionary.thefreedictionary.com/" + encodeURIComponent(searchword); 904 window.open(frameSrc, '_blank'); 905 } else { 906 $("#searchTerm").attr('required', 'required'); 907 $("button[type='submit']").trigger('click'); 908 document.getElementById("searchTerm").focus(); 909 } 910}); 911 912 913 914 915 916/*$('#openMedicalDictionary').click(function () { 917 var searchword = document.getElementById("searchTerm").value; 918 919 if (searchword != "") { 920 //var url = $("#cartoonVideo").attr('src'); 921 // ur=url+ searchword.trim(); 922 var frameSrc = "https://medical-dictionary.thefreedictionary.com/" + searchword.trim(); 923 924 Assign the initially stored url back to the iframe src 925 attribute when modal is displayed again 926 $("#medicalDictionaryModal").on('show.bs.modal', function() { 927 $("#medicalDictionary").attr('src', frameSrc); 928 }); 929 $('#medicalDictionaryModal').modal({ show: true });
930 931 } else { 932 $("#searchTerm").attr('required', 'required'); 933 $("button[type='submit']").trigger('click') 934 document.getElementById("searchTerm").focus(); 935 $('#medicalDictionaryModal').modal('hide'); 936 937 } 938 });*/ 939/*$('#openMedicalDictionary').click(function () { 940 var searchword = document.getElementById("searchTerm").value; 941 if (searchword != "") 942 { 943 var frameSrc = "http://medical-dictionary.thefreedictionary.com/" + searchword.trim(); 944 window.open(frameSrc); 945 946 } 947 else 948 { 949 $("#searchTerm").attr('required', 'required'); 950 $("button[type='submit']").trigger('click') 951 document.getElementById("searchTerm").focus(); 952 } 953 });*/ 954 955/* 956$('.agree-button').click(function(){ 957 $("#sliding-popup").hide(); 958}); 959$('.find-more-button').click(function(){ 960 var name = 'complianceCookie'; // Name of our cookie 961 962 var value="off"; 963 964 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) ; 965 window.location.href = "/page/cookies"; 966}); 967 968function createCookie(name, value) { 969 var expires; 970 971 972 var date = new Date(); 973 date.setDate(date.getDate() + 100); 974 expires = "; expires=" + date.toGMTString(); 975 976 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; 977} 978function checkCookie(name) { 979 var nameEQ = name + "="; 980 var ca = document.cookie.split(';'); 981 for(var i=0;i < ca.length;i++) { 982 var c = ca[i]; 983 while (c.charAt(0)==' ') c = c.substring(1,c.length); 984 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 985 } 986 return null; 987 } 988*/ 989/*$(".icon").click(function(){ 990 $("#pageLoder").show(); 991 if($("#jrcode").val() != null || $("#jrcode").val() != undefined){ 992 var searchAction = "/searchAction?jrcode="+$("#jrcode").val() + "&searchTerm=" + encodeURIComponent($("#searchTerm").val()); 993 }else{ 994 var searchAction = "/searchAction? &searchTerm=" + encodeURIComponent($("#searchTerm").val()); 995 } 996 location.href = searchAction; 997 998});*/ 999 1000 1001/*$(".icon").click(function(){ 1002 $("#pageLoder").show(); 1003 if($("#jrcode").val() != null || $("#jrcode").val() != undefined){ 1004 var searchAction = "/searchAction?jrcode="+$("#jrcode").val() + "&searchTerm=" + encodeURIComponent($("#searchTerm").val()); 1005 }else{ 1006 var searchAction = "/searchAction? &searchTerm=" + encodeURIComponent($("#searchTerm").val()); 1007 } 1008 location.href = searchAction; 1009 1010}); 1011 1012$(".icon").click(function(){ 1013 $("#pageLoder").show(); 1014 if($("#jrcode").val() != null || $("#jrcode").val() != undefined){ 1015 var searchAction = "/searchAction?jrcode="+$("#jrcode").val() + "&searchTerm=" + encodeURIComponent($("#searchTerm").val()); 1016 }else{ 1017 var searchAction = "/searchAction? &searchTerm=" + encodeURIComponent($("#searchTerm").val()); 1018 } 1019 location.href = searchAction; 1020 1021}); 1022 1023*/ 1024 1025 1026/*$("#searchTerm").keypress(function(e) { 1027 1028 if(e.keyCode == 13 && $("#searchTerm").val().trim() != "") { 1029 $("#pageLoder").show(); 1030 if($("#jrcode").val() != null || $("#jrcode").val() != undefined){ 1031 var searchAction = "/searchAction?jrcode="+$("#jrcode").val() + "&searchTerm=" + encodeURIComponent($("#searchTerm").val()); 1032 }else{ 1033 var searchAction = "/searchAction?searchTerm=" + encodeURIComponent($("#searchTerm").val()); 1034 } 1035 location.href = searchAction; 1036 } 1037});*/ 1038 1039/*function keyUpCheck(){ 1040 var searchItem = $("#searchTerm").val(); 1041 if(!searchItem.trim() || searchItem == ''){ 1042 $(".srchBtn").attr('disabled','disabled'); 1043 } 1044 else{ 1045 $(".srchBtn").removeAttr("disabled"); 1046 } 1047}*/ 1048var page = document.URL.split("/").pop(); 1049var name = 'ss_cookie_consent'; // Name of our cookie 1050var value = 'yes'; 1051var checkCookieValue = checkCookie(name); 1052 1053if(checkCookieValue != value){ 1054 $("#sliding-popup").css("display", "block"); 1055 $("#sliding-popup-dis").css("display", "block"); 1056 1057} 1058$('#agree-button').click(function(){ 1059 //var date = new Date(); 1060// date.setDate(date.getDate() + 100); 1061 //var expires = "; expires=" + date.toGMTString(); 1062 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; path=/";
1063 $("#sliding-popup").css("bottom", "-200px"); 1064}); 1065 1066$('#agree-button-dis').click(function() { 1067 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; path=/"; 1068 $("#sliding-popup-dis").css("bottom", "-200px"); 1069}); 1070 1071$('#find-more-button').click(function(){ 1072 var name = 'ss_cookie_consent'; // Name of our cookie 1073 var value = "no"; 1074 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) ; 1075 window.location.href = "/page/privacy-policy"; 1076}); 1077 1078function checkCookie(cname) { 1079var name = cname + "="; 1080var ca = document.cookie.split(';'); 1081for(var i = 0; i < ca.length; i++) { 1082 var c = ca[i]; 1083 while (c.charAt(0) == ' ') { 1084 c = c.substring(1); 1085 } 1086 if (c.indexOf(name) == 0) { 1087 return c.substring(name.length, c.length); 1088 } 1089} 1090return ""; 1091} 1092
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.