// JavaScript Document

// Cloud Types: CSS name, Speed, Initial Speed
CloudTypes = new Array(3)
CloudTypes[0] = ["L", 50000, 5000];
CloudTypes[1] = ["M", 30000, 20000];
CloudTypes[2] = ["S", 90000, 30000];


$(document).ready(function(){	
// Drop Down Animation
	$(".drop > ul").hide(); 
	$(".drop").hover(function(){
		$(this).children("ul").stop(true, true);
		$(this).children("ul").slideDown(600); 
		},function(){
			$(this).children("ul").slideUp(400); 
	});



// Start the cloud movement
	for (i = 0; i < CloudTypes.length; ++ i) {
		moveCloud(CloudTypes[i][0], CloudTypes[i][1], CloudTypes[i][2]);
	}

// Colorbox
	$("a[rel='lightbox[1]']").colorbox({maxHeight:"90%",opacity:1});
	$("a[rel='shadowbox']").colorbox({maxHeight:"90%",opacity:1});	
	
});

// Cloud movement
function moveCloud(id, speed, initialspeed) {
	if (parseInt($("#cloud" + id).css("left")) == 100) {
		// Second or + movement, final speed
		$("#cloud" + id).css("left", "-220px");
		thisspeed = speed;
	} else {
		// First time it's moving, so start at initial speed
		thisspeed = initialspeed;
	}		
	$("#cloud" + id).animate({left:"100%"}, thisspeed, "linear");
	setTimeout("moveCloud('" + id + "', "+speed+")", thisspeed+150);
}



	Cufon.replace('ul#navi a',{hover:true});		
	Cufon.replace('ul#navi-add a',{hover:true});	
Cufon.replace('div#content-main h4',{});	






