1jQuery(function($){ 2 3var BRUSHED = window.BRUSHED || {}; 4 5/* ================================================== 6 Mobile Navigation 7================================================== */ 8var mobileMenuClone = $('#menu').clone().attr('id', 'navigation-mobile'); 9 10BRUSHED.mobileNav = function(){ 11 var windowWidth = $(window).width(); 12 13 if( windowWidth <= 979 ) { 14 if( $('#mobile-nav').length > 0 ) { 15 mobileMenuClone.insertAfter('#menu'); 16 $('#navigation-mobile #menu-nav').attr('id', 'menu-nav-mobile'); 17 } 18 } else { 19 $('#navigation-mobile').css('display', 'none'); 20 if ($('#mobile-nav').hasClass('open')) { 21 $('#mobile-nav').removeClass('open'); 22 } 23 } 24} 25 26BRUSHED.listenerMenu = function(){ 27 $('#mobile-nav').on('click', function(e){ 28 $(this).toggleClass('open'); 29 30 if ($('#mobile-nav').hasClass('open')) { 31 $('#navigation-mobile').slideDown(500, 'easeOutExpo'); 32 } else { 33 $('#navigation-mobile').slideUp(500, 'easeOutExpo'); 34 } 35 e.preventDefault(); 36 }); 37 38 $('#menu-nav-mobile a').on('click', function(){ 39 $('#mobile-nav').removeClass('open'); 40 $('#navigation-mobile').slideUp(350, 'easeOutExpo'); 41 }); 42} 43 44 45/* ================================================== 46 Slider Options 47================================================== */ 48 49BRUSHED.slider = function(){ 50 $.supersized({ 51 // Functionality 52 slideshow : 1, // Slideshow on/off 53 autoplay : 1, // Slideshow starts playing automatically 54 start_slide : 1, // Start slide (0 is random) 55 stop_loop : 0, // Pauses slideshow on last slide 56 random : 0, // Randomize slide order (Ignores start slide) 57 slide_interval : 5000, // Length between transitions 58 transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left 59 transition_speed : 2000, // Speed of transition 60 new_window : 1, // Image links open in new window/tab 61 pause_hover : 0, // Pause slideshow on hover 62 keyboard_nav : 1, // Keyboard navigation on/off 63 performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit) 64 image_protect : 1, // Disables image dragging and right click with Javascript 65 66 // Size & Position 67 min_width : 0, // Min width allowed (in pixels) 68 min_height : 0, // Min height allowed (in pixels) 69 vertical_center : 1, // Vertically center background 70 horizontal_center : 1, // Horizontally center background 71 fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions) 72 fit_portrait : 1, // Portrait images will not exceed browser height 73 fit_landscape : 0, // Landscape images will not exceed browser width 74 75 // Components 76 slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank') 77 thumb_links : 0, // Individual thumb links for each slide 78 thumbnail_navigation : 0, // Thumbnail navigation 79 slides : [ // Slideshow Images 80 {image : '_include/img/slider-images/image01.jpg', /*title : '<div class="slide-content"><img src="#"></div>', thumb : '', url : ''*/ }, 81 {image : '_include/img/slider-images/image02.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : '' */}, 82 {image : '_include/img/slider-images/Ida-Marcia-Weihnachtsmarkt.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/}, 83 {image : '_include/img/slider-images/KoelnRio-Stand-Reker.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/}, 84 {image : '_include/img/slider-images/mariellefranco7.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/}, 85 {image : '_include/img/slider-images/image03.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/}, 86 {image : '_include/img/slider-images/image04.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/}, 87 {image : '_include/img/slider-images/tadeu-juergen-karin-zuckerhut2011.jpg',/* title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/}, 88 {image : '_include/img/slider-images/Roda_do_Brasilonia2015.jpg', /*title : '<div class="slide-content"><img src="_include/img/slider-images/logo_marielle.png"></div>', thumb : '', url : ''*/} 89 ], 90 91 // Theme Options 92 progress_bar : 0, // Timer for each slide 93 mouse_scrub : 0 94 95 }); 96 97} 98 99 100/* ================================================== 101 Navigation Fix 102================================================== */ 103 104BRUSHED.nav = function(){ 105 $('.sticky-nav').waypoint('sticky'); 106} 107 108 109/* ================================================== 110 Filter Works 111================================================== */ 112 113BRUSHED.filter = function (){ 114 if($('#projects').length > 0){ 115 var $container = $('#projects'); 116 117 $container.imagesLoaded(function() { 118 $container.isotope({ 119 // options 120 animationEngine: 'best-available', 121 itemSelector : '.item-thumbs', 122 layoutMode : 'fitRows' 123 }); 124 }); 125 126 127 // filter items when filter link is clicked 128 var $optionSets = $('#options .option-set'), 129 $optionLinks = $optionSets.find('a'); 130 131 $optionLinks.click(function(){ 132 var $this = $(this); 133 // don't proceed if already selected 134 if ( $this.hasClass('selected') ) { 135 return false;
136 } 137 var $optionSet = $this.parents('.option-set'); 138 $optionSet.find('.selected').removeClass('selected'); 139 $this.addClass('selected'); 140 141 // make option object dynamically, i.e. { filter: '.my-filter-class' } 142 var options = {}, 143 key = $optionSet.attr('data-option-key'), 144 value = $this.attr('data-option-value'); 145 // parse 'false' as false boolean 146 value = value === 'false' ? false : value; 147 options[ key ] = value; 148 if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) { 149 // changes in layout modes need extra logic 150 changeLayoutMode( $this, options ) 151 } else { 152 // otherwise, apply new options 153 $container.isotope( options ); 154 } 155 156 return false; 157 }); 158 } 159} 160 161 162/* ================================================== 163 FancyBox 164================================================== */ 165 166BRUSHED.fancyBox = function(){ 167 if($('.fancybox').length > 0 || $('.fancybox-media').length > 0 || $('.fancybox-various').length > 0){ 168 169 $(".fancybox").fancybox({ 170 padding : 0, 171 beforeShow: function () { 172 this.title = $(this.element).attr('title'); 173 this.title = '<h4>' + this.title + '</h4>' + '<p>' + $(this.element).parent().find('img').attr('alt') + '</p>'; 174 }, 175 helpers : { 176 title : { type: 'inside' }, 177 } 178 }); 179 180 $('.fancybox-media').fancybox({ 181 openEffect : 'none', 182 closeEffect : 'none', 183 helpers : { 184 media : {} 185 } 186 }); 187 } 188} 189 190 191/* ================================================== 192 Contact Form 193================================================== */ 194 195BRUSHED.contactForm = function(){ 196 $("#contact-submit").on('click',function() { 197 $contact_form = $('#contact-form'); 198 199 var fields = $contact_form.serialize(); 200 201 $.ajax({ 202 type: "POST", 203 url: "_include/php/contact.php", 204 data: fields, 205 dataType: 'json', 206 success: function(response) { 207 208 if(response.status){ 209 $('#contact-form input').val(''); 210 $('#contact-form textarea').val(''); 211 } 212 213 $('#response').empty().html(response.html); 214 } 215 }); 216 return false; 217 }); 218} 219 220 221/* ================================================== 222 Twitter Feed 223================================================== */ 224 225BRUSHED.tweetFeed = function(){ 226 227 var valueTop = -64; // Margin Top Value 228 229 $("#ticker").tweet({ 230 modpath: '_include/js/twitter/', 231 username: "Bluxart", // Change this with YOUR ID 232 page: 1, 233 avatar_size: 0, 234 count: 10, 235 template: "{text}{time}", 236 filter: function(t){ return ! /^@\w+/.test(t.tweet_raw_text); }, 237 loading_text: "loading ..." 238 }).bind("loaded", function() { 239 var ul = $(this).find(".tweet_list"); 240 var ticker = function() { 241 setTimeout(function() { 242 ul.find('li:first').animate( {marginTop: valueTop + 'px'}, 500, 'linear', function() { 243 $(this).detach().appendTo(ul).removeAttr('style'); 244 }); 245 ticker(); 246 }, 5000); 247 }; 248 ticker(); 249 }); 250 251} 252 253 254/* ================================================== 255 Menu Highlight 256================================================== */ 257 258BRUSHED.menu = function(){ 259 $('#menu-nav, #menu-nav-mobile').onePageNav({ 260 currentClass: 'current', 261 changeHash: false, 262 scrollSpeed: 750, 263 scrollOffset: 30, 264 scrollThreshold: 0.5, 265 easing: 'easeOutExpo', 266 filter: ':not(.external)' 267 }); 268} 269 270/* ================================================== 271 Next Section 272================================================== */ 273 274BRUSHED.goSection = function(){ 275 $('#nextsection').on('click', function(){ 276 $target = $($(this).attr('href')).offset().top-30; 277 278 $('body, html').animate({scrollTop : $target}, 750, 'easeOutExpo'); 279 return false; 280 }); 281} 282 283/* ================================================== 284 GoUp 285================================================== */ 286 287BRUSHED.goUp = function(){ 288 $('#goUp').on('click', function(){ 289 $target = $($(this).attr('href')).offset().top-30; 290 291 $('body, html').animate({scrollTop : $target}, 750, 'easeOutExpo'); 292 return false; 293 }); 294} 295 296 297/* ================================================== 298 Scroll to Top 299================================================== */ 300 301BRUSHED.scrollToTop = function(){ 302 var windowWidth = $(window).width(), 303 didScroll = false;
304 305 var $arrow = $('#back-to-top'); 306 307 $arrow.click(function(e) { 308 $('body,html').animate({ scrollTop: "0" }, 750, 'easeOutExpo' ); 309 e.preventDefault(); 310 }) 311 312 $(window).scroll(function() { 313 didScroll = true; 314 }); 315 316 setInterval(function() { 317 if( didScroll ) { 318 didScroll = false; 319 320 if( $(window).scrollTop() > 1000 ) { 321 $arrow.css('display', 'block'); 322 } else { 323 $arrow.css('display', 'none'); 324 } 325 } 326 }, 250); 327} 328 329/* ================================================== 330 Thumbs / Social Effects 331================================================== */ 332 333BRUSHED.utils = function(){ 334 335 $('.item-thumbs').bind('touchstart', function(){ 336 $(".active").removeClass("active"); 337 $(this).addClass('active'); 338 }); 339 340 $('.image-wrap').bind('touchstart', function(){ 341 $(".active").removeClass("active"); 342 $(this).addClass('active'); 343 }); 344 345 $('#social ul li').bind('touchstart', function(){ 346 $(".active").removeClass("active"); 347 $(this).addClass('active'); 348 }); 349 350} 351 352/* ================================================== 353 Accordion 354================================================== */ 355 356BRUSHED.accordion = function(){ 357 var accordion_trigger = $('.accordion-heading.accordionize'); 358 359 accordion_trigger.delegate('.accordion-toggle','click', function(event){ 360 if($(this).hasClass('active')){ 361 $(this).removeClass('active'); 362 $(this).addClass('inactive'); 363 } 364 else{ 365 accordion_trigger.find('.active').addClass('inactive'); 366 accordion_trigger.find('.active').removeClass('active'); 367 $(this).removeClass('inactive'); 368 $(this).addClass('active'); 369 } 370 event.preventDefault(); 371 }); 372} 373 374/* ================================================== 375 Toggle 376================================================== */ 377 378BRUSHED.toggle = function(){ 379 var accordion_trigger_toggle = $('.accordion-heading.togglize'); 380 381 accordion_trigger_toggle.delegate('.accordion-toggle','click', function(event){ 382 if($(this).hasClass('active')){ 383 $(this).removeClass('active'); 384 $(this).addClass('inactive'); 385 } 386 else{ 387 $(this).removeClass('inactive'); 388 $(this).addClass('active'); 389 } 390 event.preventDefault(); 391 }); 392} 393 394/* ================================================== 395 Tooltip 396================================================== */ 397 398BRUSHED.toolTip = function(){ 399 $('a[data-toggle=tooltip]').tooltip(); 400} 401 402 403/* ================================================== 404 Init 405================================================== */ 406 407BRUSHED.slider(); 408 409$(document).ready(function(){ 410 Modernizr.load([ 411 { 412 test: Modernizr.placeholder, 413 nope: '_include/js/placeholder.js', 414 complete : function() { 415 if (!Modernizr.placeholder) { 416 Placeholders.init({ 417 live: true, 418 hideOnFocus: false, 419 className: "yourClass", 420 textColor: "#999" 421 }); 422 } 423 } 424 } 425 ]); 426 427 // Preload the page with jPreLoader 428 $('body').jpreLoader({ 429 splashID: "#jSplash", 430 showSplash: true, 431 showPercentage: true, 432 autoClose: true, 433 splashFunction: function() { 434 $('#circle').delay(250).animate({'opacity' : 1}, 500, 'linear'); 435 } 436 }); 437 438 BRUSHED.nav(); 439 BRUSHED.mobileNav(); 440 BRUSHED.listenerMenu(); 441 BRUSHED.menu(); 442 BRUSHED.goSection(); 443 BRUSHED.goUp(); 444 BRUSHED.filter(); 445 BRUSHED.fancyBox(); 446 BRUSHED.contactForm(); 447 BRUSHED.tweetFeed(); 448 BRUSHED.scrollToTop(); 449 BRUSHED.utils(); 450 BRUSHED.accordion(); 451 BRUSHED.toggle(); 452 BRUSHED.toolTip(); 453}); 454 455$(window).resize(function(){ 456 BRUSHED.mobileNav(); 457}); 458 459});
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.