$(function() {
		$(window).load(function() {
			$('#slider').delay(800).css({"left": "640px", "z-index" : 3}).animate({left: "0"}, 800);
			$('#slider').orbit({
				animation: 'horizontal-push',
				advanceSpeed: 6000, 
				bullets: true,
				bulletThumbs: true,
				bulletThumbLocation: ''
			});
			$('ul.orbit-bullets,div.timer').hide();
			$('.orbit-bullets').slideUp('500');
			$(".orbit-wrapper").hoverIntent({over: function() {
        			$('.orbit-bullets').slideDown('600');
        			$('div.slider-nav span.right').animate({right: "0"}, 600 );
        			$('div.slider-nav span.left').animate({left: "0"}, 600 );
      			}, timeout: 200, out: function() {
					$('.orbit-bullets').slideUp('600');
	        		$('div.slider-nav span.right').animate({right: "-78px"}, 600 );
        			$('div.slider-nav span.left').animate({left: "-78px"}, 600 );
      			}});
			$('.timer').delay(1000).fadeIn('100');
		});
});
$(document).ready(function() {
						

// Children menu function

var site = function() {
	this.linkLi = $('#header ul li').children('ul').hide().end();
	this.init();
};

site.prototype = {
 	
 	init : function() {
 		this.setMenu();
 	},
 	
 	// Enables the slidedown menu, and adds support for IE6
 	
 	setMenu : function() {
 
 	
 		this.linkLi.hoverIntent({over: function() {
 			// mouseover
			$(this).find('> ul').stop(true, true).fadeIn( 600, 'linear');
 		}, timeout: 200, out: function() {
 			// mouseout
 			$(this).find('> ul').stop(true, true).fadeOut( 400, 'linear'); 		
		}});
 		
 	}
 
}

new site();

// Page styling

$('#podcast:first').css("borderTop","none");
$('.search-res:odd').css("background","#f4f4f4");

$("#loc-links img").not(".actived").hoverIntent({over: function() {
 	var newSrc = $(this).attr("src").replace("inactive", "active");
  	$(this).attr("src", newSrc);
}, timeout: 100, out: function() {
    var newSrc = $(this).attr("src").replace("active", "inactive");
  	$(this).attr("src", newSrc);
}});
	
});
