// ANIMATED SCROLL
$(document).ready(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 2000);
                return false;
            }
        }
    });
});

// FADE IN.FADE OUT FOR SIDE LOGO
$(document).ready(function(){
	$(".side-col-logo").fadeTo(2000, 1.0);
	$(".side-col-logo").hover(function(){
	$(this).fadeTo(2000, 0.2);
	},function(){
	$(this).fadeTo(2000, 1.0);
	});
});

// LAZY LOAD IMAGES
$(function() {
	$("img").lazyload({ 
		placeholder : "img/grey.gif",
		effect : "fadeIn"
	});
});

// APPENDS STAR IMAGE TO END OF LINK
$(function() {
	$("#cat-nav li")
		.append('<img src="http://www.theflybynight.com/wp-content/themes/theflybynight/img/star.png" alt="Star" height="11px" width="12px" class="star" />');
});
