-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
59 lines (45 loc) · 1.45 KB
/
Copy pathscript.js
File metadata and controls
59 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function openKontakt(){
window.location.href = 'kontakt.html';
}
function openCenovnik(){
window.location.href = 'cenovnik.html';
}
function openGalerija(){
window.location.href = 'galerija.html';
}
function openGalerijaSvecanosti(){
window.location.href = 'galerija.html#svecanosti';
}
function openGalerijaObrada(){
window.location.href = 'galerija.html#obrada';
}
function openPocetna(){
window.location.href = 'index.html';
}
function openPorudzbine(){
window.location.href = 'porudzbine.html';
}
function openCenovnik(){
window.location.href = 'cenovnik.html';
}
$(document).ready(function() {
var $lightbox = $('#lightbox');
$('[data-target="#lightbox"]').on('click', function(event) {
var $img = $(this).find('img'),
src = $img.attr('src'),
alt = $img.attr('alt'),
css = {
'maxWidth': $(window).width() - 200,
'maxHeight': $(window).height() - 200
};
$lightbox.find('.close').addClass('hidden');
$lightbox.find('img').attr('src', src);
$lightbox.find('img').attr('alt', alt);
$lightbox.find('img').css(css);
});
$lightbox.on('shown.bs.modal', function (e) {
var $img = $lightbox.find('img');
$lightbox.find('.modal-dialog').css({'width': $img.width()});
$lightbox.find('.close').removeClass('hidden');
});
});