jQuery.noConflict();

jQuery(document).ready(function() {
	jQuery('.largelogo').fadeIn('slow', function() { 
		jQuery('.largelogo').fadeOut('slow', function() {
			window.location = "/index.php"
		});
	});
});

jQuery(document).ready(function() {
jQuery('.branding').fadeIn('slow', function() {
	jQuery('.brands').fadeIn('slow', function() {
		jQuery('.primaryNav').fadeIn('normal'); 
		jQuery('.tickeritems').fadeIn('normal'); 
		jQuery('.reserve').fadeIn('normal'); 
		});									 
	});
});

jQuery(document).ready(function() {
	loopTicker();
});

jQuery(document).ready(function() {
	jQuery("#accordion").accordion({
		header: ".red",
		autoHeight: false,
		collapsible: true
	});
});


jQuery(document).ready(function()
{
	jQuery(".primary_navigation li a.expand").click(function(){
		var is_main = false;
		if(jQuery(this).parents("ul").length < 2){ is_main = true; };
		if(is_main)
		{
			var sib = jQuery(this).siblings("ul")[0];
			if (sib)
			{
				jQuery(".primary_navigation ul ul").not(sib).slideUp("slow");
			}
			else
			{
				jQuery(".primary_navigation ul ul").slideUp("slow");
			}
			jQuery(this).siblings("ul").slideToggle("slow");
		}
		var x = jQuery(".primary_navigation li a.on").removeClass("on");
		jQuery(x).each(function(){
			jQuery("span",this).show();
		});
		jQuery(this).parents("li").children("a").addClass("on");
	});
});

function loopTicker() {
jQuery(".tickeritems li").hide();
    jQuery(".tickeritems li:first-child").show();
    var total = jQuery(".tickeritems li").size();
    var count = 0;

		for (count=0; count<=total; count++) {
		if (count==total) {
			jQuery(".tickeritems li:nth-child("+count+")").animate({opacity: 1.0}, 5000*count).fadeIn(500).animate({opacity: 1.0}, 4000).fadeOut(500, loopTicker);
		} else {
			jQuery(".tickeritems li:nth-child("+count+")").animate({opacity: 1.0}, 5000*count).fadeIn(500).animate({opacity: 1.0}, 4000).fadeOut(500);
		}
	}
}