|
|
|
@ -1027,7 +1027,7 @@ var getNextSibling = function(el, way) {
@@ -1027,7 +1027,7 @@ var getNextSibling = function(el, way) {
|
|
|
|
|
next = tagName == 'a' ? $(el).parent().prev() : $(el).prev(); |
|
|
|
|
|
|
|
|
|
if (next.length == 0) { |
|
|
|
|
next = $('.navbar-fixed-left li.active a').first(); |
|
|
|
|
next = $('.navbar-fixed-left li a').first(); |
|
|
|
|
if (next.length > 0) { |
|
|
|
|
next.focus(); |
|
|
|
|
} |
|
|
|
@ -1037,8 +1037,27 @@ var getNextSibling = function(el, way) {
@@ -1037,8 +1037,27 @@ var getNextSibling = function(el, way) {
|
|
|
|
|
}else if (way == 'up' && $(el).parents('.img_main').length > 0) { |
|
|
|
|
if ($(el).parent('li').length > 0) { |
|
|
|
|
next = $(el).parents('ul').prevAll('.nav').find('li').first(); |
|
|
|
|
}else if ($(el).parent('div').length > 0) { |
|
|
|
|
next = $(el).parent('div').prevAll('ul').first().find('li').first(); |
|
|
|
|
if (next.length == 0) { |
|
|
|
|
next = $(el).parents('ul').prev('.im_mainl').find('.im_item').first(); |
|
|
|
|
} |
|
|
|
|
}else if ($(el).parent('.im_item').length > 0) { |
|
|
|
|
next = $(el).parent().prevAll('.im_item'); //6 images in one row
|
|
|
|
|
if (next.length >= 6) { |
|
|
|
|
next = $(next.get(5)); |
|
|
|
|
}else { |
|
|
|
|
next = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!next) { |
|
|
|
|
next = $(el).parent('.im_item').prevAll('ul').first().find('li').first(); |
|
|
|
|
if (next.length == 0) { |
|
|
|
|
next = $(el).parents('.im_mainl').prev('.nav').find('li.active'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (next && next.length == 0) { |
|
|
|
|
next = $('.light-switcher').parent(); |
|
|
|
|
} |
|
|
|
|
}else if (way == 'down' && $(el).parents('.navbar-fixed-left').length > 0) { |
|
|
|
|
next = tagName == 'a' ? $(el).parent().nextAll('li:not(.menu-title)').first() : $(el).next(); |
|
|
|
@ -1053,9 +1072,23 @@ var getNextSibling = function(el, way) {
@@ -1053,9 +1072,23 @@ var getNextSibling = function(el, way) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else if ($(el).parent('.im_item').length > 0) { |
|
|
|
|
next = $(el).parent().nextAll('.im_item'); //6 images in one row
|
|
|
|
|
if (next.length >= 6) { |
|
|
|
|
next = $(next.get(5)); |
|
|
|
|
}else { |
|
|
|
|
next = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!next && $(el).parents('.im_mainl').next('.nav').length > 0) { |
|
|
|
|
next = $(el).parents('.im_mainl').next('.nav').find('li.active'); |
|
|
|
|
}else if (!next && $('div.pagination-con').length > 0) { |
|
|
|
|
next = $('div.pagination-con').find('li.active').next(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else if (way == 'down' && $(el).hasClass('light-switcher')) { |
|
|
|
|
next = $('.im_item').first(); |
|
|
|
|
console.log('light switcher'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (next && next.length > 0) { |
|
|
|
|
next = next.find(tagName); |
|
|
|
|