// JavaScript Document

// CUSTOM ANIMATIONS
$(document).ready(function(){
	// Home Page Image Slider
	$('#slider').nivoSlider({
		effect:'fold',
		directionNav:false, //Next & Prev
		startSlide:0,
		pauseOnHover:false,
		controlNav:true,
		pauseTime:6000});
	
	// Main Menu
	//$("#header_menu ul li").append("<div class='buttonsMenu'></div>");
	$("#header_menu li").hover(function(){
		$(this).find(".buttonsMenu").stop().fadeTo(250,1);
		$(this).find("h5").stop().animate({color: "#EAC2DF"},250);
	}
	,function(){
		//$(this).find(".buttonsMenu").stop().fadeTo(250,0);
		$(this).find("h5").stop().animate({color: "#992C7F"},250);
	});
	
	// Accordion Titles Animation
	if($("#accordion").length){
		$("#accordion").accordion({
			active: false,
			animated: 'slide',
			autoHeight: false,
			collapsible: true
		});
		$("#accordion h4").hover(function(){
			$(this).stop().animate({ backgroundColor: '#190715'});
		}, function(){
			$(this).stop().animate({ backgroundColor: '#38102F'});
		});
	}
	
});


// Contact Us Map Changer
function changeMap(location){
	switch(location){
		case "birdroad":
			$('#jdiMaps').attr('src','http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=12721+SW+42nd+Street+Miami,+FL+33175&sll=25.670298,-80.431155&sspn=0.007262,0.009645&gl=us&ie=UTF8&hq=&hnear=12721+SW+42nd+St,+Miami,+Miami-Dade,+Florida+33175&ll=25.729723,-80.399613&spn=0.007258,0.009645&z=14&iwloc=r0&output=embed');
			$('#jdiMapsLink').attr('href','http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=12721+SW+42nd+Street+Miami,+FL+33175&sll=25.670298,-80.431155&sspn=0.007262,0.009645&gl=us&ie=UTF8&hq=&hnear=12721+SW+42nd+St,+Miami,+Miami-Dade,+Florida+33175&z=17&iwloc=r0');
		break;
		
		case "hammocks":
			$('#jdiMaps').attr('src',	'http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=14613+SW+104th+Street+Miami,+FL+33186&sll=25.729723,-80.399613&sspn=0.007258,0.009645&gl=us&ie=UTF8&hq=&hnear=14613+SW+104th+St,+Miami,+Miami-Dade,+Florida+33186&z=14&iwloc=r0&ll=25.670424,-80.431158&output=embed');
			$('#jdiMapsLink').attr('href',	'http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=14613+SW+104th+Street+Miami,+FL+33186&sll=25.729723,-80.399613&sspn=0.014517,0.01929&gl=us&ie=UTF8&hq=&hnear=14613+SW+104th+St,+Miami,+Miami-Dade,+Florida+33186&ll=25.670172,-80.431155&spn=0.007262,0.009645&z=17&iwloc=r0');
		break;	
	}
}
