var PETERPAN = {};

$(function(){
		
		jQuery.PETERPAN.mainNav();
		jQuery.PETERPAN.sitemap();
		jQuery.PETERPAN.contact();
		jQuery.PETERPAN.marquee();
		
	});


jQuery.PETERPAN = {

	mainNav : function()
	{
		$('.level_1').find('li').hover(function(){
			$(this).children('ul.level_2').css({display: 'block'});
		}, function() {
			$(this).children('ul.level_2').css({display: 'none'});
		});
	},

	sitemap : function ()
	{
		$('a.sitemap').click(function() {
			tb_show('Peter Pan Bus Sitemap', '/sitemap.php?TB_iframe=true&height=400&width=600',null);
			return false;
		});
		
		$('#sitemap').find('a').attr('target' , '_top');
	},
	
	contact : function()
	{
		$('a.contact').click(function() {
			tb_show('Peter Pan Bus Contact', '/contact.php?TB_iframe=true&height=300&width=500',null);
			return false;
		});
	},
	
	privacyPolicy : function()
	{
	tb_show('Peter Pan Bus Privacy Policy', '/privacy-policy.html?TB_iframe=true&height=600&width=500',null);
	},
	
	marquee : function()
	{
		$('.marquee').find('p').animate({left: '-300px'}, 15000, "linear",
			function(){
				$(this).css({left: '810px'});
				jQuery.PETERPAN.marquee();
			});
	}
}