/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	JS Library.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
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){}
function mycarousel_initCallback(carousel) {
	jQuery('#carousel-next').bind('click', function() {
		carousel.next();
		return false;
	});
	jQuery('#carousel-prev').bind('click', function() {
		carousel.prev();
		return false;
	});
};
jQuery(document).ready(function() {
	jQuery("#posts").jcarousel({
		wrap: "both",
		auto: 10,
		scroll: 1,
    initCallback: mycarousel_initCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
		});
	jQuery('input[value]').each(function(){
		if(this.type == 'text' || this.type == 'password') {
			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; }});
	});
});