
	
$(document).ready(function(){
	
	//$('a').filter(function() {
		//Compare the anchor tag's host name with location's host name
		// return this.hostname && this.hostname !== location.hostname;
		
		// return $(this).parent().parent().not('topNav');
	//}).addClass("external");
	$('a').parent().parent().not('topNav').addClass("external");
	
	// $.easy.navigation();
	$.easy.tooltip("a[title]");
	//$.easy.popup();
	$.easy.external('a[rel="external"], a.external, a.popup');
	$.easy.rotate();
	$.easy.forms();
	$.easy.showhide();
	$.easy.jump();


$("input.permalink").focus(function(){
    // Select input field contents
    this.select();
});
	
	$("#webtv").tabs();
	$("#webcams").tabs();
	$("#podcasts").tabs();
$("#sliderMericourch").tabs();

	$('#topNav img')
		.css('background-color','#fff')
		.css('border','1px solid #127b98')
		.css('border-bottom','0')
		.css('z-index','150')
		.css('left','0')
		.css('margin-top','2px'); 

	if ( $.browser.msie ) {
		$('#topNav img').css('padding','0 53.5px')
	} else {
		$('#topNav img').css('padding','0 53px')
	}

	$('#topNav a')
		.mouseover(function(){
			$(this).children('img').stop().animate(
				{opacity: 1}, 
				{duration:500}
			)
		})
		.mouseout(function(){
			$(this).children('img').stop().animate(
				{opacity: 0}, 
				{duration:500}
			)
		});
		
		
	$('#success').hide();
	$('#error').hide();
	
	$('#myform').FormValidate({
		phpFile:"/mail",
		ajax:true
	});
	
	
});


