j=jQuery;
j(document).ready(function(s){var uri='http://www.thecolouringbox.co.uk/wp-content/',_m=Math,_f=_m.floor,_r=_m.random;
function hx(r){r=r||'0123456789ABCDEF',h='#';
for(i=0;
i<6;
i++){var n=_f(_r()*r.length);
h+=r.substring(n,n+1);
}return h;
}function rt(l,h){l=l||1,h=h||3;
return(_r()*(h*1000))+(l*1000);
}function rc(){setTimeout(function(){var h=4,id=_f(_r()*h+1),x=j('#critter'+id);
if(id==4){x.animate({right:-10},function(){setTimeout(function(){x.animate({right:-220});
},rt());
});
}else{x.slideToggle('slow',function(){setTimeout(function(){x.slideToggle('slow');
},rt());
});
}rc();
},rt(20,60));
}rc();
j('#access').css('border-bottom','1px solid'+hx('0123456'));
j('body.blog .post').each(function(){j(this).css('border-bottom','1px dotted'+hx('0123456'));
});
j('#colophon').css('border-top','1px solid'+hx('0123456'));
var tw=false,ti=0;
j('#bird').mouseenter(function(){if(ti>3){ti=0}if(!tw){j.getJSON('http://twitter.com/status/user_timeline/_papermoon.json?count=5&callback=?',function(data){tw=data;
j('#tweet').html(data[ti].text);
});
}else{j('#tweet').html(tw[ti].text);
}++ti;
j('#tweet').css('color',hx('0123456'));
j('#tweet').show('slow');
});
j('#bird').mouseleave(function(){j('#tweet').hide('slow');
});
j('#txlw').mouseenter(function(){j(this).attr('src',uri+'themes/txlw/images/txlw-trans.png');
j('#peek').attr('src',uri+'uploads/peek.gif');
});
j('#txlw').mouseleave(function(){j(this).attr('src',uri+'themes/txlw/images/txlw-back.gif');
j('#peek').attr('src',uri+'uploads/peek-norm.gif');
});
var links=j('#primary a,.entry-content a,.entry-utility a,#randgallery a,.product a,.product .eshopbutton');
links.mouseenter(function(){e=j(this);
e.data('b',e.css('background-color'));
e.data('c',e.css('color'));
e.css('background-color',hx('89ABCDE'));
e.css('color',hx('012345'));
});
links.mouseleave(function(){e=j(this);
e.css('background-color',e.data('b'));
e.css('color',e.data('c'));
});
j('.product .eshopbutton').each(function(){j(this).css('background-color',hx('6789ABCDE'));});
j('.entry-content a,.entry-utility a, .eshopnostock').each(function(){j(this).css('color',hx('123456789'));
});
(function blat(){j('.colourit').each(function(index){j(this).animate({'background-color':hx('6789ABCDE')},250);
});
blat();
})();
});

