/////// emenu ///////
$(function(){
	try {
		$('#gnav1').emenu();
	}
    catch(e) {// 何もしない
	}	
});

/////// hover fade button ///////
$(function(){
			$("a img").hover(function(){
			$(this).fadeTo(10, 0.7);
			},function(){
		try {
			$(this).fadeTo(300, 1.0);
		}
	    catch(e) {// 何もしない
		}	
	});
});

/////// font size ///////
$(function($){
	var history = $.cookie('fontSize');
	var elm = $('html');
		(!history)? elm.addClass('fontM'):elm.addClass(history);
		$('li','#fontChange').click(function(){
	try {
		var setFontSize = this.id;
			$.cookie('fontSize', setFontSize);
		elm.removeClass().addClass(setFontSize);
	}
	catch(e) {// 何もしない
	}	
		});
});

/////// flatheights ///////
$(function() {
	try {
		$('nav.category dd.data').flatHeights();
	}
	catch(e) {// 何もしない
	}	

});

$(function(){
    var sets = [], temp = [];
	    $('.row .flame').each(function(i) {
	try {
		temp.push(this);
		if (i % 2 == 1) {
			sets.push(temp);
			temp = [];
		}
	}
	catch(e) {// 何もしない
	}	
		
	});
	if (temp.length) sets.push(temp);
			$.each(sets, function() {
		try {
			$(this).flatHeights();
		}
		catch(e) {// 何もしない
		}	
    });
});

/////// slider ///////
$(window).load(function() {
	try {
		$('#slider').nivoSlider({
			effect: 'fade',
			animSpeed: 1000,
			pauseTime: 8000,
			directionNav: false,
			controlNav: false,
			pauseOnHover: false
		});
	}
	catch(e) {// 何もしない
	}	
});

/////// colorbox ///////
$(document).ready(function(){
	$(".cb").colorbox({rel:'group2', transition:"fade"});
});

