58 lines
1.6 KiB
JavaScript
58 lines
1.6 KiB
JavaScript
$('#jquery-lightbox, img').live("contextmenu",function(event){
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
event.cancelBubble=true;
|
|
});
|
|
|
|
$(function(){
|
|
var list = [];
|
|
var id;
|
|
$('a[rel^=lightbox]').each(function(){
|
|
id = $(this).attr('rel');
|
|
if($.inArray(id, list) == -1){
|
|
list.push(id);
|
|
//$('a[rel='+id+']').lightBox();
|
|
|
|
$('a[rel='+id+']').fancybox({
|
|
titlePosition: 'outside',
|
|
transitionIn: 'elastic',
|
|
transitionOut: 'elastic',
|
|
onComplete: function(currentArray, currentIndex, currentOpts){
|
|
var index = currentIndex+1;
|
|
var target;
|
|
switch (currentOpts.titlePosition) {
|
|
case 'inside':
|
|
target = $('#fancybox-title');
|
|
break;
|
|
case 'over':
|
|
target = $('#fancybox-title-over');
|
|
break;
|
|
default:
|
|
target = $('#fancybox-title-main');
|
|
}
|
|
target.html(currentOpts.title +' ('+ index +' z '+ currentArray.length +')');
|
|
}
|
|
});//fancybox
|
|
}
|
|
});
|
|
|
|
$(".collapsible .toggle").click(function(event){
|
|
event.preventDefault();
|
|
$(this).parent().find('.sub-menu').slideToggle(500);
|
|
});
|
|
$(".collapsible .sub-menu .active").each(function(){
|
|
$(this).parent().show(); //.parent().addClass('active');
|
|
});
|
|
|
|
//$(document).pngFix();
|
|
});
|
|
|
|
$(window).load(function(){
|
|
var height = $(this).height() - 220;
|
|
$('#content-box').css('min-height', height +'px');
|
|
|
|
});
|
|
$(window).resize(function(){
|
|
var height = $(this).height() - 220;
|
|
$('#content-box').css('min-height', height +'px');
|
|
}); |