jQuery(function($){

	//別窓ウインドウ
	$('a[href^="http"]').not('a[href*="'+document.domain+'"]').click(function(){
		window.open(this.href, "_blank");
		return false;
	}).each(function() {
		$(this.parentNode).addClass('external');
	});

	//PDF
	$('a[href$=".pdf"]').click(function(){
		window.open(this.href, "_blank");
		return false;	
	}).each(function() {
		$(this.parentNode).addClass('pdf');
	});	

	//Word
	$('a[href$=".doc"]').each(function() {
		$(this.parentNode).addClass('word');
	});	

	//Excel
	$('a[href$=".xls"]').each(function() {
		$(this.parentNode).addClass('excel');
	});	

	//PPT
	$('a[href$=".ppt"]').each(function() {
		$(this.parentNode).addClass('ppt');
	});	
	
	//zip
	$('a[href$=".zip"]').each(function() {
		$(this.parentNode).addClass('zip');
	});

	//exe
	$('a[href$=".exe"]').each(function() {
		$(this.parentNode).addClass('exe');
	});
	
	//MailTo
	$('a[href^="mailto"]').each(function() {
		$(this.parentNode).addClass('mailTo');
	});	

});
