/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  JS Library.
  by DesignSlicer.com _ info@designslicer.com _
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
ieHover = function() {
	var ieEls = document.getElementById("page").getElementsByTagName("LI");
	for (var i=0; i<ieEls.length; i++) {
		ieEls[i].onmouseover=function() { this.className+=" hover"; }
		ieEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" hover\\b"), ""); }
	}
}
if (window.attachEvent) window.attachEvent("onload", ieHover);
try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}
jQuery(document).ready(function() {
  jQuery('#content .col .twitter ul li').wrapInner('<div></div>');
	jQuery('input[value]').each(function(){
		if(this.type == 'text') {
			jQuery(this).focus(function(){ if (this.value == this.defaultValue) { this.value = ''; }
			}).blur(function(){ if (!this.value.length) { this.value = this.defaultValue; }});
		}
	});
	jQuery('textarea').each(function(){
		jQuery(this).focus(function(){ if (this.value == this.defaultValue) { this.value = ''; }
		}).blur(function(){ if (!this.value.length) { this.value = this.defaultValue; }});
	});
	jQuery('.legacy .reply').click(function(event){
		event.preventDefault();
		var string = '<a class="reply-to" href="#' + jQuery(this).parents('li').attr('id') + '">@' + jQuery(this).parents('li').find('.fn').text() + ':</a>';
		var currentValue = jQuery('#comment').val();
		jQuery('#comment').val(currentValue + string + '\n').focus();
	});
	var exp = /^@/;
	var exphref = /^#comment-/;
	jQuery('.legacy .content p a').each(function(){ if (jQuery(this).text().match(exp) && jQuery(this).attr('href').match(exphref)) { jQuery(this).addClass('reply-to'); } });
	var offset = jQuery('.legacy').offset();
	jQuery('.reply-to').hover(
		function(){ jQuery(jQuery(this).attr('href')).clone().hide().attr('id','').insertAfter(jQuery(this).parents('li')).addClass('comment-tip').fadeIn('medium'); },
		function(){ jQuery('.comment-tip').fadeOut('fast',function(){ jQuery(this).remove(); }); }
	).mousemove(function(e){ jQuery('.comment-tip').css({'left' : (e.pageX - offset.left + 10) , 'top' : (e.pageY - offset.top + 5)}); });
});