$(document).ready(
	function(){
		
		$.fn.search = function() {
			return this.focus(function() {
				if( this.value == this.defaultValue ) {
					this.value = "";
				}
			}).blur(function() {
				if( !this.value.length ) {
					this.value = this.defaultValue;
				}
			});
		};
		
		// newsletter IDs
		$("#s").search();
		
		// initialize scrollable
		if($("div.scrollable").size()) {
			$("div.scrollable").scrollable({ circular: true }).autoscroll({ autoplay: true });
		}
        
        if($('#promo_items .slideshow').size()) {
	        $('#promo_items .slideshow').after('<div class="spotlightnav">').cycle({ 
	            fx: 'fade',  
	            sync: 1, 
	            speed: 500, 
	            timeout: 4000, 
	            pause: 1,
	            delay: 500,
	            pager: '#promo_items .spotlightnav'
	        });
        }
		
	}
);
