$(document).ready(function() {
// ÅäÅ»¸Þ´º //
var gnbTotal = 0;
$('.gnbTotal').hide();
$('#headerMobile .gnbMenu dt').eq(0).click(function(){
if (gnbTotal == 0) {
$('.gnbTotal').slideDown(300, 'easeOutQuad');
gnbTotal = 1;
} else {
$('.gnbTotal').slideUp(300, 'easeOutQuad');
gnbTotal = 0;
}
});
// ¸ÞÀÎ ºñÁÖ¾ó //
$('.crosscover').crosscover({
controller: false,
dotNav: true
});
// ¸ÞÀÎ ¾Æ·¡·Î À̵¿¹öư //
$('.crosscover-island > p').click(function(){
$('html, body').animate({ scrollTop : $(window).height()-61 }, 900, 'easeOutQuad');
});
// ¸ÞÀÎ Ä«ÇÇ //
$('.mainCopy01 > h1').textillate();
$('.mainCopy01 > h2').textillate();
// ¸ÞÀÎ °¶·¯¸® //
var $container = $('.mainGalley').isotope({
itemSelector: '.item',
layoutMode: 'masonry'
});
$('#filters').on( 'click', 'a', function() {
var filterValue = $(this).attr('data-filter');
$container.isotope({ filter: filterValue });
$('#filters > a').removeClass('on');
$(this).addClass('on');
});
$('.item').hover(function (event) {
$(this).find('dl').stop().animate({ opacity : '1.0' }, 350, 'easeOutQuad');
}, function (event) {
$(this).find('dl').stop().animate({ opacity : '0.0' }, 350, 'easeOutQuad');
});
$('.mainGalley').magnificPopup({
delegate: '.item',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: 'The image #%curr% could not be loaded.',
titleSrc: function(item) {
return item.el.attr('title') + 'by Diprism';
}
}
});
});
// ¸µÅ©Á¡¼± Á¦°Å //
function bluring(){
if(event.srcElement.tagName=="A" || event.srcElement.tagName=="IMG")
document.body.focus();
}
document.onfocusin=bluring;