// JavaScript Document

var duration = 0;

$(document).ready(function(){
	hoverImage();
	hoverWorkBlock();
	hoverAboutBlock();
	hoverTopicBlock();
	hoverThumbList();
	hoverInnerNavi();
});

function hoverImage(){
	$('.ihover').hover(function(){
		$(this).css("border-color", "#fb421b");
	}, function(){
		$(this).css("border-color", "#000000");
	})
}

function hoverWorkBlock(){
	if(!iOS){
		$('.work_block').hover(function(){
			$(this).css("border-color", "#fb421b");
			$(this).find(".copy").css("opacity", 1).css("display", "block");
		}, function(){
			$(this).css("border-color", "#000000");
			$(this).find(".copy").css("display", "none");
		});
	}
}

function hoverAboutBlock(){
	$('.about_block').hover(function(){
		$(this).css("border-color", "#fb421b");
	}, function(){
		$(this).css("border-color", "#000000");
	})
}

function hoverTopicBlock(){
	$('.topic_block').hover(function(){
		$(this).css("background-color", "#ffffff");
		$(this).children('.title').css("background-color", "#fb421b");
		$(this).children('.title').css("color", "#ffffff");
		$(this).children('img').css("border-color", "#fb421b");
	}, function(){
		$(this).children('.title').css("background-color", "#ffffff");
		$(this).children('.title').css("color", "#fb421b");
		$(this).children('img').css("border-color", "#000000");
	})
}

function hoverThumbList(){
	$('.bhover').css("background-color", "#ffffff");
	$('.bhover').hover(function(){
		$(this).css("background-color", "#ffffff");
		$(this).find('.title').css("background-color", "#fb421b");
		$(this).find('.title').css("color", "#ffffff");
		$(this).find('.client').css("background-color", "#fb421b");
		$(this).find('.client').css("color", "#ffffff");
		$(this).find('img').css("border-color", "#fb421b");
	}, function(){
		if ($(this).attr('class').indexOf('current') == -1) {
			$(this).find('.title').css("background-color", "#ffffff");
			$(this).find('.title').css("color", "#fb421b");
			$(this).find('.client').css("background-color", "#ffffff");
			$(this).find('.client').css("color", "#808080");
			$(this).find('img').css("border-color", "#e8e8e8");
		}
	})
}

function hoverInnerNavi(){
	$('.in_navi').hover(function(){
		$(this).find("a").css("background-color", "#fb421b");
		$(this).find("a").css("color", "#ffffff");
	}, function(){
		if ($(this).attr('class').indexOf('current') == -1) {
			$(this).find("a").css("background-color", "#ffffff");
			$(this).find("a").css("color", "#fb421b");
		}
	})
}
