$(document).ready(function () {   
	$('#nav li').hover(  
		function () {  
		$('ul', this).slideDown(100);  
		},   
		function () {  
		$('ul', this).slideUp(100);           
		}  
	);  
	$(".scroll").click(function(event){
		event.preventDefault();
		var full_url = this.href;
		var parts = full_url.split("#");
		var trgt = parts[1];
		var target_offset = $("#"+trgt).offset();
		var target_top = target_offset.top;
		$('html, body').animate({scrollTop:target_top}, 500);
	});
	
	if ($('#focus').length > 0){
		$('#focus').cycle({
			fx: 'scrollLeft',
			pause: '1',
			timeout: 4500
		});
	}
    
	$(".openup").colorbox({iframe:true, innerWidth:635, innerHeight:670});
	
	//  search box controller 
	$("#_search").click(function(){

		$("#search").slideToggle('slow', function() {
			// Animation complete.
			$(".search-box").focus();
		});
		
		return false;
	});
	
}); 

//  Splitting the snippet in half—keep the first half at the top of the page and move the rest to the bottom. 
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22657521-1']);
_gaq.push(['_trackPageview']);
