$(function(){ //kleinigheidje if ($.browser.webkit) {$('#submitNb').css({'margin-top':2}); $('#contactForm textarea').css({width:283}); } $('#dep .box_220').hover(function(){$(this).stop().animate({color:'#ffffff'}, 'slow'); }, function(){$(this).stop().animate({color:'#808080'}, 'slow'); }); var normalStat = 75, downStat = 600; $(".fancyBox").fancybox({ 'titlePosition':'over', 'overlayColor':'#000', 'overlayOpacity':0.4, 'centerOnScroll':true }); $(".fancyBoxIframe").fancybox({ 'titlePosition':'over', 'overlayColor':'#000', 'overlayOpacity':0.4, 'width':600, 'height': '75%', 'type':'iframe', 'centerOnScroll':true }); $("#portfolioHolder").cycle({ fx: 'fade', timeout: 0, speed: 800, next: '#next', prev:'#prev' }); $('#header').append('
Loading....
'); $('.message').css({opacity:0}); //laden met hashtag if(window.location.hash){ //verwijder # teken $current = window.location.hash.replace(/^.*#/, ''); $('#mainMenu li').find('[rel^='+$current+']').closest('li').addClass('active'); $('#c-'+$current+' .innah').stop().animate({top:normalStat}, 'slow'); } else { $('#mainMenu li#m-home').addClass('active'); $('#c-home .innah').animate({top:normalStat},'slow'); } //bij klik op alle links met .hash als class $('a.hash').click(function(e){ e.preventDefault(); //voorkom hier dubbele animatie bij een actief item if(!$(this).closest('li').hasClass('active')){ //verwijder # teken $id = $(this).attr('href').replace(/^.*#/, ''); $('.message').stop().animate({opacity:1}, 'slow'); $('#mainMenu li').removeClass('active'); //check buttons buiten de #mainMenu if($id == 'home'){ $('#mainMenu li#m-home').addClass('active'); } if($id == 'portfolio'){ $('#mainMenu li#m-portfolio').addClass('active'); } if($id == 'about'){ $('#mainMenu li#m-about').addClass('active'); } if($id == 'contact'){ $('#mainMenu li#m-contact').addClass('active'); } if($id == 'tekie'){ $('#mainMenu li#m-tekie').addClass('active'); } if($id == 'brian'){ $('#mainMenu li#m-brian').addClass('active'); } if($id == 'gloria'){ $('#mainMenu li#m-gloria').addClass('active'); } if($id == 'erikah'){ $('#mainMenu li#m-erikah').addClass('active'); } if($id == 'craig'){ $('#mainMenu li#m-craig').addClass('active'); } if($id == 'james'){ $('#mainMenu li#m-james').addClass('active'); } if($id == 'deborah'){ $('#mainMenu li#m-deborah').addClass('active'); } //animeren :^) $('.innah').stop().animate({top:downStat}, 'slow', function(){$('.message').stop().animate({opacity:0}, 'slow'); $('#c-'+$id+' .innah').stop().animate({top:normalStat}, 'slow'); //zet de hash goed :) //dit doe ik omdat er op IE7 de animatie naar boven verspringt //heb de preventDefault erin gezet en de hash kunstmatig erin zetten... window.location.hash = $id; }); } }); //scroll body naar top $('#bottom a.hash').click(function(){ $('html, body').animate({scrollTop:0}, 'slow'); }); //$('#c-tools img').css({opacity:.4}); /*$('#c-tools #myTools li').hover(function(){$(this).find('img').stop().animate({opacity:1}); }, function(){$(this).find('img').stop().animate({opacity:.4}); });*/ }); getTwitters('tweet', { id: 'aphichat', count: 1, enableLinks: true, newwindow: true, ignoreReplies: true, clearContents: true, template: 'Recente tweet: "%text%"' });