
Cufon.replace('h3',{color:'#000'});function hideDrawer(){$("#theme-drawer #theme-container").slideToggle("normal",function(){if($("#theme-drawer #theme-container").is(':visible')){$("#footer").css("margin-bottom","150px");}else{$("#footer").css("margin-bottom","20px");}});}
function hideSign(){$("#the-sign-container #the-sign").hide("normal");}
jQuery.easing.def='easeOutQuint';function clearText(field){if(field.defaultValue===field.value)field.value='';else if(field.value==='')field.value=field.defaultValue;}
var currentPosition=0;var slowScrollSpeed=0;var timer;var totalWidth=2000;var outerWidth=1000;var leftLimit=outerWidth-totalWidth;function updateLimits(){totalWidth=document.getElementById("theme-carousel").clientWidth;outerWidth=document.getElementById("theme-housing").clientWidth;leftLimit=outerWidth-totalWidth+160;}
function themeScroll(number){updateLimits();currentPosition+=number;if(currentPosition>0){currentPosition=0;}
$("#theme-carousel").animate({left:currentPosition+"pt"},500);updateButtons();return;}
function scrollPrevious(){themeScroll(133);return;}
function scrollNext(){themeScroll(-133);return;}
function setSlowScroll(amount){}
function slowScroll()
{if(slowScrollSpeed){currentPosition+=slowScrollSpeed;document.getElementById("theme-carousel").style.left=currentPosition+"pt";updateButtons();}}
function updateButtons()
{if(currentPosition<0){document.getElementById("theme-previous").style.visibility="visible";}else{document.getElementById("theme-previous").style.visibility="hidden";}
if(currentPosition>leftLimit){document.getElementById("theme-next").style.visibility="visible";}else{document.getElementById("theme-next").style.visibility="hidden";}
return;}
window.onresize=function()
{updateLimits();updateButtons();};konami.load("http://files.anidea.com/ANidea-Wallpapers.zip");$(document).ready(function(){$('#theme-drawer #theme-container').hide();$(document).pngFix();$('#categories-preview ul').equalHeights(true);blanks=".new-window, #hp-flickr ul li a, .comment-list li h4 a, #stuff-we-love ul li a, #blog-roll ul li a";$(blanks).attr({target:'_blank'});$('#submit').attr({value:''});$('.searchtxt').attr({onFocus:'clearText(this)',onBlur:'clearText(this)'});$("#archive-box .month, #archive-box .year").change(function(){var c_time=new Date();var url="?month="+$("#archive-box .month").val()+"\&yr="+$("#archive-box .year").val()+"\&time="+c_time.getTime();$("#archive-box ul").load("/query/"+url+" ul");return false;});$("#archive-box .month").trigger("change");tooltip();$('#hp-popular > ul').tabs({fx:{opacity:'toggle'}});$('#contact-options > ul').tabs({fx:{opacity:'toggle'}});var timers=new Array();$('#main-nav ul li.dropdown').each(function(i){$(this).hover(function(){clearTimeout(timers[i*2]);clearTimeout(timers[i*2+1]);var elem=$(this);elem.addClass('current');if(elem.find('.ro-container').is(':visible'))return;timers[i*2]=setTimeout(function(){elem.find('.ro-container').show();},200);},function(){clearTimeout(timers[i*2]);clearTimeout(timers[i*2+1]);var elem=$(this);elem.removeClass('current');if(elem.find('.ro-container').is(':hidden'))return;timers[i*2+1]=setTimeout(function(){elem.find('.ro-container').fadeOut("def");},200);});});$("a.theme-thumb").click(function(){var themename=$(this).attr("rel");$("#anet-theme").attr({href:"http://files.anidea.com/themes/"+themename+"/style.css"});hideDrawer();$.cookie('user_theme',themename,{path:'/',expires:7});return false;});$("a.theme-post").click(function(){var themename=$(this).attr("rel");$("#anet-theme").attr({href:"http://files.anidea.com/themes/"+themename+"/style.css"});$.cookie('user_theme',themename,{path:'/',expires:7});return false;});$(".theme-toggle").click(function(){hideDrawer();});$("#the-sign").click(function(){hideSign();});$("#archives ul li:nth-child(odd)").addClass("odd");function killIt(){$(function(){$('#IE6-alert').fadeOut(1000);});}
$("#commentform").validate({rules:{author:"required",email:"required"}});$("#commentform").validate({messages:{author:"Oops, you forgot your Name!",email:"Please write down your e-mail. We won't display it."}});});
