3 var viewport
= $(window
),
6 header
= $('#top div.wrap'),
13 if(window
.location
.pathname
=== '/') {
14 body
.css({position
: 'relative', top
: -50, opacity
: 0})
15 .animate({ top
: 0, opacity
: 1 });
23 search
.css('margin-top', -(search
.outerHeight() - 4));
25 // Append some way of making it come back
27 marginTop
= search
.css('margin-top');
29 header
.append('<img src="' + base
+ 'img/search.gif" id="search">').children('#search').click(function() {
32 search
.animate({marginTop
: clicked
% 2 === 0 ? marginTop
: 0});
34 if(clicked
% 2 === 0) {
35 $(this).animate({opacity
: 0}, 200, function() {
36 $(this).attr('src', base
+ 'img/search.gif').animate({opacity
: 1}, 200);
39 search
.animate({marginTop
: marginTop
});
42 $(this).animate({opacity
: 0}, 200, function() {
43 $(this).attr('src', base
+ 'img/close.gif').animate({opacity
: 1}, 200);
46 search
.animate({marginTop
: 0});