/*
 * UPDATE : 2011.03.03
 * AUTOR : watuu
 * 
 *
 * 1.reset
 * 2.hover img
 * 3.IE png
 * 4.other
 *
*/

/*
 1.reset [
----------------------------------------------------------- */
$(function(){
	//外部リンクにtarget="_blank"を付与
	$("a[href^='http://']").attr("target","_blank");
	$("a[href$='.pdf']").attr("target","_blank");
	//css3のクラスを追加
	$('body :first-child').addClass('firstChild');
	$('body :last-child').addClass('lastChild');
	$('ul, ol').each(function(){
		$(this).children('li:odd').addClass('even');
		$(this).children('li:even').addClass('odd');
	});
	$('table, tbody').each(function(){
		$(this).children('tr:odd').addClass('even');
		$(this).children('tr:even').addClass('odd');
	});
	$('body :empty').addClass('empty');
});

/*
 2.hover img [
----------------------------------------------------------- */
$(function(){
  $("a img").hover(function(){
				$(this).animate({opacity: 0.65},150);
			},
			function(){
				$(this).animate({opacity: 1},150);
			});
});

/*
 3.IE png [
----------------------------------------------------------- */
$(function(){
	if(jQuery.browser.msie && (parseInt(jQuery.browser.version) == 6 || parseInt(jQuery.browser.version) == 7 || parseInt(jQuery.browser.version) == 8 )){
		$("img[src$='.png']").fixPng();
	}
}); 

/*
 4.other [
----------------------------------------------------------- */

$(function(){
	$("#example .c3 ul li").each(function(n){
		$(this).addClass("nth-child"+(n+1));
	});
});




