$(document).ready(function() {

	var things = $('.best-things li');
	
	$(window).scroll(function() {		
		var offset = window.pageYOffset;

		$('.main-womens').css({
			"background-position" : "50% "+ (200 - (offset / 4))+"px"
		});
		$('.main-mens').css({
			"background-position" : "50% "+ (500 -(offset / 4))+"px"
		});
		$('.main-eccectic').css({
			"background-position" : "50% "+ (750 - (offset / 4))+"px"
		});
		$('.main-accessories').css({
			"background-position" : "50% "+ (1000 -(offset / 4))+"px"
		});
		$('.main-locations').css({
			"background-position" : "50% "+ (1200 - (offset / 4))+"px"
		});
		$('.main-contact').css({
			"background-position" : "50% "+ (1500 -(offset / 4))+"px"
		});
		
		
	/* Intro */
		$('.intro .best-seven').css({
			"top" : (15+(offset/20))+"%"
		});
	
	
	/* Womens Background */
		$('.main-womens .forground').css({
			"background-position" : "50% "+ (650-(offset / 2))+"px"
		});
		$('.main-womens .groundup').css({
			"background-position" : "50% "+ (1000-(offset / 1.1))+"px"
		});
		$('.main-womens .groundup2').css({
			"background-position" : "50% "+ (1000+(offset / 1.5))+"px"
		});
	
	/* Mens Background */
		$('.main-mens .forground').css({
			"background-position" : "50% "+ (1150-(offset / 2))+"px"
		});
		$('.main-mens .groundup').css({
			"background-position" : "50% "+ (2000-(offset / 1.1))+"px"
		});
	/* Eclectic Background */
		$('.main-eccectic .forground').css({
			"background-position" : "50% "+ (1850-(offset / 2))+"px"
		});
		$('.main-eccectic .groundup').css({
			"background-position" : "50% "+ (2905-(offset / 1.1))+"px"
		});
		
	/* Accessories Background */
		$('.main-accessories .forground').css({
			"background-position" : "50% "+ (1150-(offset / 2))+"px"
		});
		$('.main-accessories .groundup').css({
			"background-position" : "50% "+ (3815-(offset / 1.1))+"px"
		});
			
	/* Accessories Background */
		$('.main-locations .forground').css({
			"background-position" : "50% "+ (1150-(offset / 2))+"px"
		});
		$('.main-locations .groundup').css({
			"background-position" : "50% "+ (4720-(offset / 1.1))+"px"
		});

		
	});
});


$(window).load(function() {
	/*
$('#sketches').orbit({
		'bullets': false,
		'timer' : false,
		'animation' : 'fade',
		'captions' : false
	});
*/
	$('.loading').animate({"top" : "100%"});
});

$(function() {
                $('ul.menu a').bind('click',function(event){
                    var $anchor = $(this);
                    
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 2000,'easeInOutQuad');
                    /*
                    if you don't want to use the easing effects:
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1000);
                    */
                    event.preventDefault();
                });
                $('.topofpage a').bind('click',function(event){
                    var $anchor = $(this);
                    
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1500,'easeInOutExpo');
                    /*
                    if you don't want to use the easing effects:
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 1000);
                    */
                    event.preventDefault();
                });
            });


