1 2 3var RYC = { 4 init: function(){ 5 if($("html").hasClass("oldie")){ 6 /* archive list fix ie */ 7 $(".archive-list li:nth-child(even)").addClass("even"); 8 $(".archive-list li:nth-child(odd)").addClass("odd"); 9 /* placeholder fix for ie */ 10 var input = document.createElement("input"); 11 if(('placeholder' in input)==false) { 12 $('[placeholder]').focus(function() { 13 var i = $(this); 14 if(i.val() == i.attr('placeholder')) { 15 i.val('').removeClass('placeholder'); 16 if(i.hasClass('password')) { 17 i.removeClass('password'); 18 this.type='password'; 19 } 20 } 21 }).blur(function() { 22 var i = $(this); 23 if(i.val() == '' || i.val() == i.attr('placeholder')) { 24 if(this.type=='password') { 25 i.addClass('password'); 26 this.type='text'; 27 } 28 i.addClass('placeholder').val(i.attr('placeholder')); 29 } 30 }).blur().parents('form').submit(function() { 31 $(this).find('[placeholder]').each(function() { 32 var i = $(this); 33 if(i.val() == i.attr('placeholder')) 34 i.val(''); 35 }) 36 }); 37 } 38 } 39 var t = $('#tabs'); 40 if(t.get(0)){ 41 RYC.hideTabs(); 42 t.find('a').each(function(i){ 43 var t = $(this), href = t.attr('href'); 44 t.click(function(){ 45 RYC.hideTabs(); 46 $(href.substring(href.indexOf('#'))).show(); 47 var img = t.find('img'), src = img.attr('src').replace('.png', '_current.png'); 48 img.attr('src', src); 49 return false; 50 }); 51 if((platform == 'pc' && href.indexOf('-pc') > -1) || 52 (platform == 'mac' && href.indexOf('-mac') > -1)){ 53 t.click(); 54 } 55 }); 56 if(!t.find('li.selected').get(0)){ 57 t.find('a:first').click(); 58 } 59 } 60 RYC.selectMenuItem(); 61 }, 62 hideTabs: function(){ 63 $('#tabs a.targets').each(function(i){ 64 var t = $(this), img = t.find('img'), src = img.attr('src').replace('_current.png', '.png'); 65 img.attr('src', src); 66 $(t.attr('href').substring(t.attr('href').indexOf('#'))).hide(); 67 }); 68 }, 69 selectMenuItem: function(){ 70 var idName = $("body").attr("class").split(" ", 1), 71 $navItem = $("#nav-"+idName); 72 if($navItem.length === 0){ 73 $navItem = $("#nav-"+idName+"-archive"); 74 if($navItem.length === 0){ 75 return false; 76 } 77 } 78 if($navItem.parents("ul").length >= 2){ 79 $navItem = $navItem.parents("li"); 80 } 81 $navItem.addClass("selected"); 82 } 83}; 84RYC.init(); 85 86(function ($) { 87 var menu = { 88 open: function (cb) { 89 if (!nav_open) menu.toggle(cb); 90 }, 91 close: function (cb) { 92 if (nav_open) menu.toggle(cb); 93 }, 94 toggle: function (cb) { 95 $inner.animate({ left: nav_open ? 0 : "70%" }, 300, cb); 96 $header.animate({ left: nav_open ? 0 : "70%" }, 300, cb); 97 $footer.animate({ left: nav_open ? 0 : "70%" }, 300, cb); 98 $("body").toggleClass("menu-open"); 99 $(window).scrollTop(0); // scroll to top when clicking on menu open 100 nav_open = !nav_open; 101 } 102 }, 103 $body = $("body") 104 .click(function (ev) { 105 var $tar = $(ev.target); 106 if ($tar.is(".mobile #nav-open-btn")) { 107 ev.preventDefault(); 108// console.log(ev, ev.target); 109// $(window).scrollTop(0); // scroll to top when clicking on menu open 110 menu.toggle(); 111 } 112 else if (nav_open && $body.is(".mobile")) { 113 var redirect = false; 114 if ($tar.is("a")) { 115 redirect = $tar[0].href; 116 } 117 else if ($tar.is("a *")) { 118 redirect = $tar.closest("a")[0].href; 119 } 120 if (redirect) { 121 ev.preventDefault(); 122 menu.toggle(function () { 123 window.location.href = redirect; 124 }); 125 } 126 else { 127 menu.toggle(); 128 } 129 } 130 }); 131 132 133 134 if (document.createElement("div").ontouchend !== undefined) { 135 (function () { 136 var start_pos = false; 137 var last_pos = false; 138 var touch_item = "page"; 139 var touch_target = document.body; 140 var vertical_touch = function () { return Math.abs(start_pos[0] - last_pos[0]) < Math.abs(start_pos[1] - last_pos[1]); }; 141 touch_target.ontouchstart = function (ev) { start_pos = [ev.touches[0][touch_item+"X"], ev.touches[0][touch_item+"Y"]]; ev.stopPropagation(); }; 142 touch_target.ontouchmove = function (ev) { 143 last_pos = [ev.touches[0][touch_item+"X"], ev.touches[0][touch_item+"Y"]]; 144 if (!vertical_touch()) ev.preventDefault(); 145 }; 146 touch_target.ontouchend = function (ev) { 147 if (start_pos) { 148 ev.stopPropagation(); 149 last_pos = [ev.changedTouches[0][touch_item+"X"], ev.changedTouches[0][touch_item+"Y"]]; 150 var dx = start_pos[0] - last_pos[0]; 151 var dy = start_pos[1] - last_pos[1]; 152 if ( 153 Math.abs(dx) > 200 && 154 Math.abs(dx) > Math.abs(dy) 155 ) menu[dx < 0 && $body.hasClass("mobile") ? "open": "close"](); 156 } 157 }; 158 } ()); 159 } 160
161 var $inner = $('#inner-wrap'), 162 nav_open = false, 163 $content = $("#content"), 164 $header = $("#header"), 165 $footer = $("#footer"), 166 $nav = $("#nav"), 167 $window = $(window).resize(function(){ 168 /* Mobile... */ 169 if ($window.width() < 768){ 170 $body.addClass("mobile"); 171 172 if ($content.height() > $nav.height()) { 173 $nav.height($(document).height()); 174 } 175 else if ($window.height() > $nav.height()) { 176 $nav.height($window.height()); 177 } 178 } 179 /* Desktop */ 180 else { 181 $body.removeClass("mobile"); 182 $inner.css("left", "0"); 183 $header.css("left", "0"); 184 $footer.css("left", "0"); 185 $nav.height("100%"); 186 } 187 }); 188 189 $window.resize(); 190 191 var $mainContainer = $("body"), 192 screenWidth = $(window).width(), 193 isMobile = screenWidth >= 320 && screenWidth < 768, 194 isIOS = $body.hasClass("ios"), 195 isIOS4 = $body.hasClass("ios4"), 196 isIpad = $body.hasClass("ipad"), 197 isAdvancedBrowser = false === isMobile && false === isIpad && false === isIOS4, 198 stickyOffset = 45; 199 200 /* Sticky navigation */ 201 if (isAdvancedBrowser) { 202 $(document).bind("ready scroll touchmove", function () { 203 if($(document).scrollTop() >= stickyOffset) { 204 $mainContainer.addClass("sticky"); 205 } 206 else { 207 $mainContainer.removeClass("sticky"); 208 } 209 }); 210 } 211} (jQuery)); 212 213( function ($) { 214 var feedback = function (msg) { 215 $(".mail-instructions").find(".feedback").remove(); // oude feedback verwijderen 216 $(".mail-instructions").prepend('<p class="feedback">'+msg+'</p>'); 217 }; 218 $.tracking.on("validator-loaded", "form", function(){ 219 var f = $(this); 220 if(f.size() > 0){ 221 f.each( 222 $(this).validate({ 223 errorElement: "p", 224 invalidHandler: function (event, validator) { 225 var msg = ""; 226 $("#lang").val() === "en" ? msg = "To send the instructions you have to fill all the fields correctly." : msg = "Om de instructies te versturen dien je alle velden correct in te vullen."; 227 validator.numberOfInvalids() ? feedback(msg) : $(".feedback").hide(); 228 } 229 230 }) 231 ); 232 } 233 }); 234} (jQuery) );
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.