// On Pageload

$(document).ready(function(){
	$("#name").focus();
	
	$('.misc').masonry({
	    columnWidth: 50, 
	    itemSelector: '.portfolio, .news, .testimonial, .what-we-do, .approach, .footer' 
	});
	
	$('.linkme').click(function(){
		window.location = 'http://aol.com/';
	});
	
	$('#everything-nav label').click(function() {
		$('label').removeClass('loading');
		$('#everything-nav label').addClass('loading');
		window.location = 'http://click-boom.com/';
		/* $('#primary').hide();
		$('html, body').animate({scrollTop:0}, 'slow');
		$('.misc li').hide();
		$('.misc').masonry({
		    columnWidth: 50, 
		    itemSelector: '.portfolio, .news, .testimonial, .what-we-do, .approach, .footer' 
		});
		$('.misc li').fadeIn(); */
	});
	
	$('#testimonials-nav label').click(function() {
		$('label').removeClass('loading');
		$('#testimonials-nav label').addClass('loading');
		window.location = '/testimonials/';
		/* $('#primary').hide();
		$('html, body').animate({scrollTop:0}, 'slow');
		$('.misc li').hide();
		$('.misc').masonry({
		    columnWidth: 50, 
		    itemSelector: '.testimonial, .footer' 
		});
		$('.misc li.testimonial, .misc li.footer').fadeIn(); */
	});
	
	$('#portfolio-nav label').click(function() {
		$('label').removeClass('loading');
		$('#portfolio-nav label').addClass('loading');
		window.location = '/portfolio/';
		/* $('#primary').hide();
		$('html, body').animate({scrollTop:0}, 'slow');
		$('.misc li').hide();
		$('.misc').masonry({
		    columnWidth: 50, 
		    itemSelector: '.portfolio, .footer' 
		});
		$('.misc li.portfolio, .misc li.footer').fadeIn(); */
	});
	
	$('#news-and-updates-nav label').click(function() {
		$('label').removeClass('loading');
		$('#news-and-updates-nav label').addClass('loading'); 
		window.location = '/news/';
		/* $('#primary').hide();
		$('html, body').animate({scrollTop:0}, 'slow');
		$('.misc li').hide();
		$('.misc').masonry({
		    columnWidth: 50, 
		    itemSelector: '.news, .footer' 
		});
		$('.misc li.news, .misc li.footer').fadeIn(); */
	});
	
	$('#approach-nav label').click(function() {
		$('label').removeClass('loading');
		$('#approach-nav label').addClass('loading');
		window.location = '/approach/';
		/* $('#primary').hide();
		$('html, body').animate({scrollTop:0}, 'slow');
		$('.misc li').hide();
		$('.misc').masonry({
		    columnWidth: 50, 
		    itemSelector: '.approach, .what-we-do, .footer' 
		});
		$('.misc li.approach, .misc li.what-we-do, .misc li.footer').fadeIn(); */
	});
	
	$('.slides').cycle({ 
		fx:     'fade', 
		speed:  'fast', 
		timeout: 0, 
		pager:  '.slide-nav' 
	});
	
	$('.brand a').mousedown(function(){
		$('.fuse').addClass('ignite');
		$(this).addClass('boom');
		});
	
/*
	$('.misc li.portfolio a').click(function(){
        $('html, body').animate({scrollTop:0}, 'slow');
        $('#primary').addClass('show');
        $('#primary').load('index.php/portfolio/client2/war-untold');
        return false;
    });
	
	$('a').address(function() {  
		return $(this).attr('href').replace(/^#/, '');  
	}); 

    $('img').lazyload();
*/
	
});