$(function() {
	if ($.browser.msie && parseInt($.browser.version.substr(0,1)) < 7) {
		$("#body_top .tabs .off").hover(function() {
			$(this).css("color", "#0099D2");
		},
		function() {
			$(this).css("color", "#9FD9EE");
		});
		
		$("#side_top .tabs .off").hover(function() {
			$(this).css("color", "#F7941E");
		},
		function() {
			$(this).css("color", "#FCCB8F");
		});
	}
	
	/* Special Tab
	$("#special_tab").fadeTo("100", "0.7");
	$("#special_tab").hover(function() {
		$(this).fadeTo("100", "1.0")
	},
	function (){
		$(this).fadeTo("100", "0.7")
	});
	
	$("a.fancy").fancybox();
	$("a#special_tab").fancybox({
		'frameHeight':	140,
		'frameWidth':	400,
		'padding':		10,
		'hideOnContentClick':	false,
		'overlayShow':	true,
		'callbackOnShow' : function() {
			 $('#fancy_title').hide();
			 $(".deal_contact").click(function () {
				$.fn.fancybox.close();
				if($("#message").val() == "") {
					$("#message").val("Deal Of thirds!\n------------------------\n");
				}
				$("#message").focus();
				$("#message").animate( { backgroundColor: '#FCdB9F' }, 1000, function () {
					$("#message").animate( { backgroundColor: '#F0F0F0' }, 500, function() {
						$(this).attr("style", "");
					});
				});
				return false;
			});
		}
	});
	*/
	
	$('#contactform').FormValidate({
		phpFile:"",
		ajax:true,
		validCheck: true
	});
	
	jQuery("div#slider1").codaSlider();
	
	$(".mini_btn_contact").click(function() {
		if($("#message")) {
			$("#message").focus();
			$("#message").animate( { backgroundColor: '#FCdB9F' }, 500, function () {
				$("#message").animate( { backgroundColor: '#F0F0F0' }, 500, function() {
					$(this).attr("style", "");
				});
			});
		}
	});
	
	$(".tweet").tweet({
		username: "anautumnecho",
		join_text: "auto",
		avatar_size: 48,
		count: 3,
		auto_join_text_default: " -<br />",
		auto_join_text_ed: " -<br />",
		auto_join_text_ing: " -<br />",
		auto_join_text_reply: " -<br />",
		auto_join_text_url: " -<br />",
		loading_text: "loading tweets..."
	});
	
	$(".mini_btn").fadeTo("normal", "0.5");
	$(".mini_btn").hover(function() {
		$(this).fadeTo("100", "1");
	}, function() {
		$(this).fadeTo("100", "0.5");
	});
	$(".external").click(function(){
			$(this).attr("target","_blank");
	});
	
	$("a#special_tab").trigger('click');
	
});
