$(document).ready(function() { 
	 
	 $('.slides').cycle({		
	        speed:  800,
	        timeout: 5000,
	        pager:  '.carousel_buttons',
			pause: true,
	        pagerAnchorBuilder: function(idx, slide) {
	            // return sel string for existing anchor
	            return '.carousel_buttons li:eq(' + (idx) + ') a';
	        }
	
	});
	
	$('.nav ul').superfish({ 
	    delay: 500,                                     // one second delay on mouseout
	    animation: {opacity:'show',height:'show'},      // fade-in and slide-down animation
	    speed: 'fast',                                  // faster animation speed
	    autoArrows: false,                              // disable generation of arrow mark-up
	    dropShadows: false                              // disable drop shadows
	}); 
	
	$(".colorbox").colorbox({initialWidth:100, initialHeight:100, maxWidth:"90%", maxHeight:"90%", inline:true, href:"#newsletterForm"});	
	
	if($(".search #query").length) {
		if($("#search #query").val() == '') {
			$("#search #query").val('Search');
		}
		$(".search #query").focus(function(){
			if (this.value == 'Search') {
				this.value='';
			}
		});
		
		$(".search #query").blur(function(){
			if (this.value == '') {
				this.value='Search';
			}
		});
	}
	

});

