$(document).ready(function(){
	
	Shadowbox.init();
	
	/*
	$('#menubar li').each(function(){
		$(this).hover(
		function() {
			$(this).find('.dropdown').fadeTo(300, 1.0);
		});
	});
	

	$('.dropdown').hover(
		function() {
		}, 
		function() {
			$(this).clearQueue().stop(true, true).fadeOut(300);
		});	
	*/
	$('#twitter').hover(
		function(){
			$('#twitter_off').fadeOut(300);
		},
		function(){
			$('#twitter_off').fadeIn(300);
		}
	);
	
	$('#twitter_feed').tweet({
            username: "luxeyaletown",
            join_text: "auto",
            avatar_size: 0,
            count: 1,
            auto_join_text_default: ":", 
            auto_join_text_ed: ":",
            auto_join_text_ing: ":",
            auto_join_text_reply: ":",
            auto_join_text_url: ":",
            loading_text: "<center><img src=\"/images/twitter_loader.gif\" alt=\"loading Twitter feed...\" /></center>"
	});
	
	$(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}, 1000);
 
                return false;
 
            }
 
        }
 
    });
 
});
	
	
});

function closeotherdropdowns(thisid) {
	$('.dropdown').each(
			function(){
				if($(this).attr('id')!=thisid) {
					$(this).clearQueue().stop(true, true).fadeOut(300);		
				}
			}
			);
}
