1// When DOM is fully loaded 2jQuery(document).ready(function ($) { 3 4 /* FlexSlider 5 --------------------------------------------------*/ 6 7 $('.flexslider').flexslider({ 8 namespace : "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin 9 selector : ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril 10 animation : "fade", //String: Select your animation type, "fade" or "slide" 11 easing : "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! 12 direction : "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" 13 reverse : false, //{NEW} Boolean: Reverse the animation direction 14 animationLoop : true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end 15 smoothHeight : false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode 16 startAt : 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide) 17 slideshow : true, //Boolean: Animate slider automatically 18 slideshowSpeed : 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds 19 animationSpeed : 600, //Integer: Set the speed of animations, in milliseconds 20 initDelay : 0, //{NEW} Integer: Set an initialization delay, in milliseconds 21 randomize : false, //Boolean: Randomize slide order 22 23 // Usability features 24 pauseOnAction : true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. 25 pauseOnHover : false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering 26 useCSS : true, //{NEW} Boolean: Slider will use CSS3 transitions if available 27 touch : true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices 28 video : false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches 29 30 // Primary Controls 31 controlNav : true, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage 32 directionNav : true, //Boolean: Create navigation for previous/next navigation? (true/false) 33 prevText : "Previous", //String: Set the text for the "previous" directionNav item 34 nextText : "Next", //String: Set the text for the "next" directionNav item 35 36 // Secondary Navigation 37 keyboard : true, //Boolean: Allow slider navigating via keyboard left/right keys 38 multipleKeyboard : false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present. 39 mousewheel : false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel 40 pausePlay : false, //Boolean: Create pause/play dynamic element 41 pauseText : 'Pause', //String: Set the text for the "pause" pausePlay item 42 playText : 'Play', //String: Set the text for the "play" pausePlay item 43 44 // Special properties 45 controlsContainer : "", //{UPDATED} Selector: USE CLASS SELECTOR. Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be ".flexslider-container". Property is ignored if given element is not found. 46 manualControls : "", //Selector: Declare custom control navigation. Examples would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. 47 sync : "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care. 48 asNavFor : "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider 49 }); 50 51 /* Quotes Rotator 52 --------------------------------------------------*/ 53 54 $('ul.quotes').quote_rotator({ 55 rotation_speed: 4000, 56 pause_on_hover: true, 57 randomize_first_quote: true 58 }); 59 60 /* Sticky Navigation 61 --------------------------------------------------*/ 62 63 if ($('body.one-page').length) { 64 65 $('.header-top').clingify({ 66 breakpoint: 767, // in pixels 67 extraClass: '', 68 throttle: 100, // in milliseconds 69 70 // Callback functions: 71 detached: $.noop, 72 locked: $.noop, 73 resized: $.noop 74 }); 75 76 $(function () { 77 var header = $(".header-top"); 78 $(window).scroll(function () { 79 var scroll = $(window).scrollTop(); 80 81 if (scroll >= 50) { 82 header.removeClass('header-top').addClass("header-top-light"); 83 } else { 84 header.removeClass("header-top-light").addClass('header-top'); 85 } 86 }); 87 }); 88 89 }; 90 91 /* Smooth Page Scroll 92 --------------------------------------------------*/ 93 94 $('#sf li a, #uber-scroll-to').click(function () { 95 var el = $(this).attr('href'); 96 var elWrapped = $(el); 97 scrollToDiv(elWrapped, 100); 98 return false; 99 }); 100 101 function scrollToDiv(element, navheight) { 102 var offset = element.offset(); 103 var offsetTop = offset.top; 104 var totalScroll = offsetTop - navheight; 105 106 $('body,html').animate({ 107 scrollTop: totalScroll 108 }, 500); 109 } 110 111 /* Select Navigation (Mobile Menu) 112 --------------------------------------------------*/ 113 114 selectnav('sf', { 115 label: 'NAVIGATION', 116 autoselect: false, 117 nested: true, 118 indent: '-' 119 }); 120 121 /* Superfish (Dropdown Menu) 122 --------------------------------------------------*/ 123 124 $('ul.sf-menu').superfish({
125 delay: 100, // the delay in milliseconds that the mouse can remain outside a submenu without it closing 126 animation: { 127 opacity: 'show' 128 }, // an object equivalent to first parameter of jQueryâs .animate() method. Used to animate the submenu open 129 animationOut: { 130 opacity: 'hide' 131 }, // an object equivalent to first parameter of jQueryâs .animate() method Used to animate the submenu closed 132 speed: 'fast', // speed of the opening animation. Equivalent to second parameter of jQueryâs .animate() method 133 speedOut: 'fast', // speed of the closing animation. Equivalent to second parameter of jQueryâs .animate() method 134 cssArrows: true, 135 autoArrows: false, 136 disableHI: true, 137 }); 138 139 /* FitVids Responsive Video 140 --------------------------------------------------*/ 141 142 $(".container").fitVids(); 143 144 /* Isotope (http://isotope.metafizzy.co) 145 --------------------------------------------------*/ 146 147 if ($('body.full-image, body.alternative, .full-width').length) { 148 149 function portfolioColumn() { 150 var width = $(window).width(), 151 column; 152 153 if (width > 1400) { 154 column = 4; 155 } else if (width > 1000) { 156 column = 3; 157 } else if (width > 550) { 158 column = 2; 159 } else if (width > 0) { 160 column = 1; 161 } 162 163 return column; 164 } 165 166 function setColumn() { 167 if (!$('.portfolio-items').length) return false 168 169 var width = $(window).width(), 170 column = portfolioColumn(), 171 articleWidth = Math.floor(width / column); 172 173 $('.portfolio-items .project-item').each(function () { 174 $(this).css({ 175 width: articleWidth + 'px' 176 }); 177 }); 178 } 179 180 setColumn(); 181 $(window).bind('resize', function () { 182 setColumn(); 183 }); 184 }; 185 186 $(window).load(function () { 187 var $container = $('.portfolio-items'); 188 var $filter = $('.filter'); 189 // Initialize isotope 190 $container.isotope({ 191 filter: '*', 192 layoutMode: 'fitRows', 193 animationOptions: { 194 duration: 750, 195 easing: 'linear' 196 } 197 }); 198 // Filter items when filter link is clicked 199 $filter.find('a').click(function () { 200 var selector = $(this).attr('data-filter'); 201 $filter.find('a').removeClass('current'); 202 $(this).addClass('current'); 203 $container.isotope({ 204 filter: selector, 205 animationOptions: { 206 animationDuration: 750, 207 easing: 'linear', 208 queue: false, 209 } 210 }); 211 return false; 212 }); 213 }); 214 215 /* Pie Chart (http://rendro.github.io/easy-pie-chart/) 216 --------------------------------------------------*/ 217 218 $('.percentage').easyPieChart({ 219 animate: 1000, 220 size: 200, 221 barColor: '#333333', 222 trackColor: '#ddd', 223 scaleColor: false, 224 lineCap: 'butt', 225 lineWidth: 35 226 }); 227 228 /* Overlay Vertical Alignment 229 --------------------------------------------------*/ 230 231 $.fn.extend({ 232 verticalAlign: function () { 233 //Iterate over the current set of matched elements 234 return this.each(function () { 235 var obj = $(this); 236 // calculate the new padding and height 237 var childHeight = obj.height(); 238 var parentHeight = obj.parent().height(); 239 var diff = Math.round(((parentHeight - childHeight) / 2)); 240 // apply new values 241 obj.css({ 242 "display": "block", 243 "margin-top": diff 244 }); 245 }); 246 } 247 }); 248 var callback = function () { 249 $(".project-item .overlay .details").verticalAlign(); 250 $(".news-item .overlay .details").verticalAlign(); 251 $(".team-member .overlay .details").verticalAlign(); 252 }; 253 $(document).ready(callback); 254 $(window).resize(callback); 255 $(window).load(callback); 256 257 /* Back to top Scroll 258 --------------------------------------------------*/ 259 260 $('#back-to-top a').click(function () { 261 $('body,html').animate({ 262 scrollTop: 0 263 }, 800); 264 return false; 265 });
266 267 /* Latest Tweet/Twitter Widget 268 --------------------------------------------------*/ 269 270 /* 271 * ### HOW TO CREATE A VALID ID TO USE: ### 272 * Go to www.twitter.com and sign in as normal, go to your settings page. 273 * Go to "Widgets" on the left hand side. 274 * Create a new widget for what you need eg "user timeline". 275 * Feel free to check "exclude replies" if you dont want replies in results. 276 * Now go back to settings page, and then go back to widgets page, you should 277 * see the widget you just created. Click edit. 278 * Now look at the URL in your web browser, you will see a long number like this: 279 * 345735908357048478 280 * Use this as your ID below instead! 281 */ 282 283 /** 284 * How to use fetch function: 285 * @param {string} Your Twitter widget ID. 286 * @param {string} The ID of the DOM element you want to write results to. 287 * @param {int} Optional - the maximum number of tweets you want returned. Must 288 * be a number between 1 and 20. 289 * @param {boolean} Optional - set true if you want urls and hash 290 tags to be hyperlinked! 291 * @param {boolean} Optional - Set false if you dont want user photo / 292 * name for tweet to show. 293 * @param {boolean} Optional - Set false if you dont want time of tweet 294 * to show. 295 * @param {function/string} Optional - A function you can specify to format 296 * tweet date/time however you like. This function takes a JavaScript date 297 * as a parameter and returns a String representation of that date. 298 * Alternatively you may specify the string 'default' to leave it with 299 * Twitter's default renderings. 300 * @param {boolean} Optional - Show retweets or not. Set false to not show. 301 * @param {function/string} Optional - A function to call when data is ready. It 302 * also passes the data to this function should you wish to manipulate it 303 * yourself before outputting. If you specify this parameter you must 304 * output data yourself! 305 */ 306 307 // ##### Simple example 1 ##### 308 // A simple example to get my latest tweet and write to a HTML element with 309 // id "tweets". Also automatically hyperlinks URLS and user mentions and 310 // hashtags. 311 //twitterFetcher.fetch('352711627528880128', 'latest-tweet', 1, true, false); 312 313 if ($('body#home.default, body#home.alternative, body#home.one-page, body#home.corporate').length) { 314 twitterFetcher.fetch('546688911582711809', 'twitter-fetcher-tweet', 1, true, false); 315 }; 316 317 if ($('.sidebar').length) { 318 twitterFetcher.fetch('546688911582711809', 'twitter-feed', 4, true, false, true); 319 }; 320 321 /* Enable zebra-striping on Homepage Blog Posts 322 --------------------------------------------------*/ 323 324 if ($('#home.blog-style').length) { 325 $('.news-item:odd').addClass('stripe'); 326 }; 327 328 if ($('#home.corporate').length) { 329 $('.content:odd').addClass('stripe'); 330 }; 331 332 /* Google Map 333 --------------------------------------------------*/ 334 335 // RB: Dit heb ik uitgezet om Google Maps te vervangen voor een plaatje 336 // if ($('body.one-page, body.contact').length) { 337 // var map; 338 // map = new GMaps({ 339 // div: '#map', 340 // lat: -2.403262, 341 // lng: 34.658526, 342 // zoom: 8, 343 // scrollwheel: false, // Remove this line if you would like to enable zooming of the map via mousewheel/touchpad. 344 // draggable: false, // Remove this line if you would like to enable dragging of the map via mouse/touchpad. 345 // disableDefaultUI: true, 346 // }); 347 // map.drawOverlay({ 348 // lat: map.getCenter().lat(), 349 // lng: map.getCenter().lng(), 350 // content: '<i class="fa fa-map-marker"></i>', 351 // verticalAlign: 'top', 352 // horizontalAlign: 'center' 353 // }); 354 // // The styles below present your map in Monochrome. If you would like to use a normal coloured map with your theme, then please remove the code below, from lines 107 to 225, and uncomment line 96 above. 355 // var styles = [{ 356 // stylers: [{ 357 // hue: "#8A8E7D" 358 // }, { 359 // saturation: -60 360 // }] 361 // }, { 362 // featureType: "road", 363 // elementType: "geometry", 364 // stylers: [{ 365 // lightness: 100 366 // }, { 367 // visibility: "simplified" 368 // }] 369 // }, { 370 // featureType: "road", 371 // elementType: "labels", 372 // stylers: [{ 373 // visibility: "off" 374 // }] 375 // }]; 376 377 // map.setOptions({ 378 // styles: styles 379 // }); 380 // }; 381 382 /* Accordion Widget 383 --------------------------------------------------*/ 384 385 //Add Inactive Class To All Accordion Headers 386 $('.accordion-header').toggleClass('inactive-header'); 387 //Set The Accordion Content Width 388 var contentwidth = $('.accordion-header').width(); 389 //Open The First Accordion Section When Page Loads 390 $('.accordion-header').first().toggleClass('active-header').toggleClass('inactive-header'); 391 $('.accordion-content').first().slideDown().toggleClass('open-content'); 392 // The Accordion Effect 393 $('.accordion-header').click(function () { 394 if ($(this).is('.inactive-header')) { 395 $('.active-header').toggleClass('active-header').toggleClass('inactive-header').next().slideToggle().toggleClass('open-content'); 396 $(this).toggleClass('active-header').toggleClass('inactive-header'); 397 $(this).next().slideToggle().toggleClass('open-content'); 398 } else { 399 $(this).toggleClass('active-header').toggleClass('inactive-header'); 400 $(this).next().slideToggle().toggleClass('open-content'); 401 } 402 }); 403 404 /* Tabbed Content 405 --------------------------------------------------*/ 406 407 $(".tab-content").hide(); 408 $(".tab-content:first").show(); 409 $("ul.tabs li").click(function () { 410 $("ul.tabs li").removeClass("active"); 411 $(this).addClass("active"); 412 $(".tab-content").hide(); 413 var activeTab = $(this).attr("data-id"); 414 $("#" + activeTab).fadeIn(); 415 }); 416 417 /* Toggles 418 --------------------------------------------------*/ 419 420 $(function () { // run after page loads 421 $(".toggle_container").hide(); 422 //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state) 423 $("p.trigger").click(function () { 424 $(this).toggleClass("active").next().slideToggle("normal"); 425 return false; //Prevent the browser jump to the link anchor 426 }); 427 }); 428 // valid XHTML method of target_blank 429 $(function () { // run after page loads 430 $('a[rel*=external]').click(function () { 431 window.open(this.href); 432 return false; 433 }); 434 }); 435 436 /* Contact Form 437 --------------------------------------------------*/ 438 439 // Validate the contact form 440 $('.contact-form, .contact-form-standard').validate({ 441 // Add requirements to each of the fields 442 rules: { 443 name: { 444 required: true, 445 minlength: 2 446 }, 447 email: { 448 required: true, 449 email: true 450 }, 451 message: { 452 required: true, 453 minlength: 10 454 } 455 }, 456 // Specify what error messages to display 457 // when the user does something horrid 458 messages: { 459 name: { 460 required: "Please enter your name.", 461 minlength: jQuery.format("At least {0} characters required.") 462 }, 463 email: { 464 required: "Please enter your email.", 465 email: "Please enter a valid email." 466 }, 467 message: { 468 required: "Please enter a message.", 469 minlength: jQuery.format("At least {0} characters required.") 470 } 471 }, 472 // Use Ajax to send everything to php/form.php 473 submitHandler: function (form) { 474 $("#submit").attr("value", "Sending...");
475 $(form).ajaxSubmit({ 476 target: "#response", 477 success: function (responseText, statusText, xhr, $form) { 478 $(form).slideUp("fast"); 479 $("#response").html(responseText).hide().slideDown("fast"); 480 } 481 }); 482 return false; 483 } 484 }); 485 486 /* Form Placeholder Functionality for IE8/IE9 487 --------------------------------------------------*/ 488 489 if (!Modernizr.input.placeholder) { 490 $(document).on('focus', '[placeholder]', function () { 491 var input = $(this); 492 if (input.val() == input.attr('placeholder')) { 493 input.val(''); 494 input.removeClass('placeholder'); 495 } 496 }) 497 $(document).on('blur', '[placeholder]', function () { 498 var input = $(this); 499 if (input.val() == '' || input.val() == input.attr('placeholder')) { 500 input.addClass('placeholder'); 501 input.val(input.attr('placeholder')); 502 } 503 }) 504 $('[placeholder]').blur(); 505 $(document).on('submit', 'form', function () { 506 $(this).find('[placeholder]').each(function () { 507 var input = $(this); 508 if (input.hasClass('placeholder') && input.val() == input.attr('placeholder')) { 509 input.val(''); 510 } 511 }) 512 }); 513 } 514 515 /* Column clearing 516 --------------------------------------------------*/ 517 518 $('.service-items .one-third.column').eq(3).addClass('clearcol'); 519 $('.team-members .one-third.column').eq(3).addClass('clearcol'); 520 521 /* End all Custom Functions */ 522 523});
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.