1 2function ImageBanner(thisScroll) { 3 var msie6 = $.browser == 'msie' && $.browser.version < 7; 4 if (!msie6) { 5 var top = $('.menutop').offset().top - parseFloat($('.menutop').css('margin-top').replace(/auto/, 0)); 6 7 var y = thisScroll.scrollTop(); 8 if (y > top) { 9 $('header').addClass('fixed'); 10 // $('.banner').addClass('heightn'); 11 } else { 12 $('header').removeClass('fixed'); 13 // $('.banner').removeClass('heightn'); 14 } 15 } 16 17} 18 19function disableBack() { window.history.forward(); } 20 21$(function () { 22 23 window.onload = disableBack(); 24 window.onpageshow = function (evt) { if (evt.persisted) disableBack(); } 25 26 $(window).scroll(function () { 27 28 ImageBanner($(this)); 29 if ($(this).scrollTop() > 50) { 30 $('#back-to-top').fadeIn(); 31 } else { 32 $('#back-to-top').fadeOut(); 33 } 34 }); 35 36 $('.formholder form input').keypress(function (e) { 37 if (e.which == 10 || e.which == 13) { 38 $('.formholder form input.eventLogin').click(); 39 } 40 }); 41 42 $(document).on("click", ".eventLogin", function () { 43 $(".eventLogin").addClass("disabled"); 44 var obj = {}; 45 obj.UserName = $(this).parent().find("#UserName").val(); 46 obj.Password = $(this).parent().find("#Password").val(); 47 48 var currentUrl = window.location.href; 49 var JsitePath = currentUrl.split("/")[2]; 50 var sitePath=currentUrl.split("/")[2]; 51 // sitePath = "http://" + sitePath + "/events/eventscalendar"; 52 sitePath = "http://" + sitePath + "/events/eventgallery"; 53 var jobssitePath = "http://" + JsitePath + "/jobboard"; 54 55 $.ajax({
56 type: "POST", 57 contentType: "application/json; charset=utf-8", 58 data: JSON.stringify(obj), 59 url: "/ValidateLogin.aspx/ValidateUser", 60 dataType: "json", 61 success: function (msg) { 62 $(".eventLogin").removeClass("disabled"); 63 64 if (msg.d == "1") { 65 window.location.href = sitePath; 66 } 67 else if (msg.d == "2") 68 { 69 window.location.href = jobssitePath; 70 } 71 else { 72 $(".login .error,.login1 .error").html("Invalid credentials"); 73 } 74 } 75 }); 76 }); 77 78 $(document).on("click", ".btnJobSeekerLogin", function () { 79 80 $(".btnJobSeekerLogin").addClass("disabled"); 81 82 var Username = $(this).parents("form").find("#Username").val(); 83 var Password = $(this).parents("form").find("#Password").val(); 84 85 if (Username == "") { 86 $(this).parent().addClass("hasError"); 87 } 88 if (Password == "") { 89 $(this).parent().addClass("hasError"); 90 } 91 if (Username == "" || Password == "") { 92 return false; 93 } 94 var obj = {}; 95 obj.Username = Username; 96 obj.Password = Password; 97 98 var currentUrl = window.location.href; 99 var JsitePath = currentUrl.split("/")[2]; 100 var sitePath = currentUrl.split("/")[2]; 101 //sitePath = "http://" + sitePath + "/events/eventscalendar"; 102 sitePath = "http://" + sitePath + "/events/eventgallery"; 103 var jobssitePath = "http://" + JsitePath + "/jobslist"; 104 105 $.ajax({
106 type: "POST", 107 contentType: "application/json; charset=utf-8", 108 data: JSON.stringify(obj), 109 url: "/ValidateLogin.aspx/JobSeekerLogin", 110 dataType: "json", 111 success: function (msg) { 112 $(".btnJobSeekerLogin").removeClass("disabled"); 113 114 if (msg.d == "1") { 115 window.location.href = sitePath; 116 } 117 else if (msg.d == "2") { 118 window.location.href = jobssitePath; 119 } 120 else { 121 $(".blkJobSeekerLogin .error").html("Invalid credentials"); 122 } 123 } 124 }); 125 }); 126 127 128 $(document).on("click", ".btnLogout", function () { 129 130 var currentUrl = window.location.href; 131 var sitePath = currentUrl.split("/")[2]; 132 //sitePath = "http://" + sitePath + "/home"; 133 if (currentUrl.indexOf("/home") > -1) { 134 sitePath = "http://" + sitePath + "/"; 135 } else { 136 sitePath = "http://" + sitePath + "/home"; 137 } 138 139 $.ajax({
140 type: "POST", 141 contentType: "application/json; charset=utf-8", 142 url: "/ValidateLogin.aspx/LogoutUser", 143 dataType: "json", 144 success: function (msg) { 145 //$("#bs-example-navbar-collapse-1 .home a").click(); 146 window.location.href = sitePath; 147 } 148 }); 149 }); 150 151 152 $(document).on("click", ".loginclose", function () { 153 $(".navbar-collapse .login,.mobilelogin .login1").hide(); 154 }); 155 156 $('input[type="submit"]').mousedown(function () { 157 $(this).css('background', '#666'); 158 }); 159 $('input[type="submit"]').mouseup(function () { 160 $(this).css('background', '#666'); 161 }); 162 163 $('#loginform').click(function () { 164 $('.login').fadeToggle('slow'); 165 $(this).toggleClass('redlogin'); 166 }); 167 168 169 170 $(document).mouseup(function (e) { 171 var container = $(".login"); 172 173 if (!container.is(e.target) // if the target of the click isn't the container... 174 && container.has(e.target).length === 0) // ... nor a descendant of the container 175 { 176 container.hide(); 177 $('#loginform').removeClass('redlogin'); 178 } 179 }); 180 181 182 $('#loginform1').click(function () { 183 $('.login1').fadeToggle('slow'); 184 $(this).toggleClass('redlogin'); 185 }); 186 187 188 189 $(document).mouseup(function (e) { 190 var container = $(".login1"); 191 192 if (!container.is(e.target) // if the target of the click isn't the container... 193 && container.has(e.target).length === 0) // ... nor a descendant of the container 194 { 195 container.hide(); 196 $('#loginform1').removeClass('redlogin'); 197 } 198 }); 199 200});
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.