$(function() {
	// to activate poll on homepage
	// setTimeout(function() {
	// 	$("#poll").trigger("click");
	// }, 1000);
	
	$("div.bio a.close").livequery("click", function() {
		$(this).parent().parent().hide();
	});	
	
	// O-MAMA Buttons
	$(".home-omama-button").qtip({
		content: {
			text: 'Join the Campaign For Common Sense'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 125,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	//Change Begins at Home
	$(".mission a h3").qtip({
		content: {
			text: 'Read our Mission'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 100,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	//Kitchen Table Talk
	$(".home-videos").qtip({
		content: {
			text: 'See the latest O-MAMA videos'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'bottomleft',
				tooltip: 'bottomLeft'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 230,
		padding: 5,
		tip: 'topMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Michelle's Photos
	$(".bio-michelle img").qtip({
		content: {
			text: "Read Michelle's bio"
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 100,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Debbie's Photos
	$(".bio-debbie img").qtip({
		content: {
			text: "Read Deb's bio"
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'topLeft',
				tooltip: 'topRight'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 125,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Opinion
	$(".home-opinion").qtip({
		content: {
			//text: 'Read the latest headlines'
			text: "News & events from a mom's perspective"
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 300,
		padding: 5,
		tip: 'bottomMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Postcard
	$(".home-holiday").qtip({
		content: {
			text: 'Celebrate seasons and different traditions'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'rightMiddle',
				tooltip: 'leftMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 200,
		padding: 5,
		tip: 'leftMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// OH MAMA Comic
	$(".comic a img").qtip({
		content: {
			text: 'Print or share'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightTop'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 100,
		padding: 5,
		tip: 'rightTop',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Smiley Button
	$(".home-smile").qtip({
		content: {
			//text: 'Send a smile to another mom'
			//text: "Send a "+$(this).find('img.home-smile-image').attr('alt')+" to another mom"
			//text: 'Send some good luck!'
			text: 'Send a mom a flower'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'topRight',
				tooltip: 'bottomLeft'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		//width: 215,
		width: 170,
		padding: 5,
		tip: 'leftBottom',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Cause Icon
	$(".home-cause-icon").qtip({
		content: {
			text: "Learn more about "+$(this).find('img.cause-icon').attr('alt')
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		},
		show: {
			effect: {
				length: 580,
				type: 'fade'
			}
		},		
		style: {
		width: 250,
		padding: 5,
		tip: 'bottomMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Things to Do
	$(".things #accordion").qtip({
		content: {
			text: 'Make a difference'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 100,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	
	// Quotes
	$(".quote").qtip({
		content: {
			text: 'Read more inspiring quotes'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 200,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});
	// Note to Obama
	$(".home-letter").qtip({
		content: {
			text: 'Read our letter to the President'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 100,
		padding: 5,
		tip: 'rightMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});

	// Lightbulb
	$(".home-lightbulb").qtip({
		content: {
			text: 'Share your bright ideas with us'
		},
		show: {
			delay: 10,
			effect: {
				length: 50
			}
		},
		hide: 'mouseout',
		position: {
			corner: {
				target: 'bottomMiddle',
				tooltip: 'topMiddle'
			}
		},
		show: {
			effect: {
				length: 600,
				type: 'fade'
			}
		},		
		style: {
		width: 230,
		padding: 5,
		tip: 'topMiddle',
		name: 'blue',
		color: '#fff',
		background: '#4485C4',
		border: {
		         width: 5,
		         radius: 5,
		         color: '#4485C4'
		      }
	}
	});

});