//Methods Used in the site	

$(document).ready(function(){
	// iPad and iPhone hover fix
	/*if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		$("#navbar li").bind('touchstart', function(){
			//console.log("touch started");
		});
	}*/
	if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		$("#navbar ul li").click(function(){
			//we just need to attach a click event listener to provoke iPhone/iPod/iPad's hover event
			//strange
		});
	}

	$('.inner a').hover(
		function(){
			$(this).parent().parent().prev().children('img').addClass('title-img-hover');
		},
		function(){
			$(this).parent().parent().prev().children('img').removeClass('title-img-hover');
		}
	);
	$('.title-img').hover(
		function(){
			$(this).parent().next().find('a').addClass('over');
			$(this).addClass('title-img-hover');
		},
		function(){
			$(this).parent().next().find('a').removeClass('over');
			$(this).removeClass('title-img-hover');
		}
	);
});
