function oc(a)
{
	var o = {};
	
	for(var i=0;i<a.length;i++){o[a[i]]='';}
	return o;
}

function buildExternal(){
	$('a').click(function(){
	
		try{
			domain = $(this).attr("href").match(/:\/\/(.[^/]+)/)[1];
			
			lexceptions = new Array('dor.eecoder.com', 'www.addthis.com', 'dailyoptionsreport.com', 'www.dailyoptionsreport.com');

			if(domain in oc(lexceptions)){}else{
				window.open( $(this).attr('href') );
        		return false;
			}
		}catch(e){console.log(e); return false;}

	});
}

$(function(){
	$("#keywords").focus(function(){
		if ($(this).val() == "Enter a keyword Search")
		{
			$(this).val('');
		}
	});

	$("#keywords").blur(function(){
		if ($(this).val() == "")
		{
			$(this).val("Enter a keyword Search");
		}
	});

	$("#archive-month").change(function() {
		window.location = $(this).val();
	});
	
	$(".share-print").click(function() {
		window.print();
		return false;
	});
	
	$(".share-email").click(function() {
		
		$("#tell-a-friend").slideToggle();
		
		return false;
	});
	
	buildExternal();

});