<div id=
"fb-root"
></div>
<script>(
function
(d, s, id) {
var
js, fjs = d.getElementsByTagName(s)[0];
if
(d.getElementById(id))
return
;
js = d.createElement(s); js.id = id;
js.src =
"//connect.facebook.net/de_DE/all.js#xfbml=1"
;
fjs.parentNode.insertBefore(js, fjs);
}(document,
'script'
,
'facebook-jssdk'
));</script>
<style>
html,body{background:
#fff}
.content{color:
#ccc;font:14px/1.4 arial,sans-serif;width:900px; height:100px;margin:20px auto}
h1{line-height:1.1;letter-spacing:-1px;}
.layer{ background:
#9F0; color:#000; width:50%!important; height:50%!important }
#galleria{ width: 700px; height: 670px; background-image:url(background.png);}
</style>
<div id=
"galleria"
>
{EXPLODE}<form><input type=
"hidden"
/>{pos}</form><img
class
=
"agree"
src=
"include/images/gallery/img_thumb_{id}.{endung}"
rel=
"include/images/gallery/img_{id}.{endung}"
name=
"{pos}"
meid=
"{pos}"
id=
"{pos}"
align=
"middle"
border=
"0"
/>{EXPLODE}
</div>
<script>
$(
'input:hidden'
).change(
function
(){
var
text = $(
this
).val();
get_text: hidden
},
function
(data){
alert(data);
});
});
var
full_url = document.URL;
var
url_array = full_url.split(
'#/'
)
var
last_segment = url_array[url_array.length-1];
var
last_segment1 = url_array[url_array.length-2];
$(
'#galleria'
).galleria({
autoplay:
false
,
lightbox:
false
,
delay: 0,
layer:
true
,
trueFullscreen:
false
,
clicknext:
false
,
show: last_segment,
});
Galleria.run(
'#galleria'
);
Galleria.on(
'image'
,
function
() {
$(
'#galleria'
).click(
function
() {
var
intfull = document.URL;
var
imageid_array = intfull.split(
'#/'
) ;
last_seget = imageid_array[imageid_array.length-1];
name = last_seget;
$.ajax({
type:
'POST'
,
async:
false
,
data:{idid:last_seget},
success:
function
(data){
},
});
});
});
Galleria.on(
'image'
,
function
() {
$(
'#galleria'
).click(
function
() {
intfull = document.URL;
var
imageid_array = intfull.split(
'#/'
) ;
last_sege = imageid_array[imageid_array.length-1];
alert(last_sege);
return
false
;
});
});
Galleria.on(
'image'
,
function
() {
intfull = document.URL;
var
imageid_array = intfull.split(
'#/'
) ;
last_seg = imageid_array[imageid_array.length-1];
});
var
iframe =
function
(last_seg) {
var
url = last_segment1 +
'#/'
+ last_seg;
var
rurl = url;
return
'<div class="fb-like" data-href="'
+url+
'" data-width="450" data-show-faces="true" data-send="false"></div>'
;
}
Galleria.on(
'data'
,
function
() {
var
self =
this
;
$.each( self._data,
function
(i) {
self._data[i].layer = iframe(i);
});
});
Galleria.ready(
function
(){
this
.bind(
'image'
,
function
(e) {
FB.XFBML.parse();
});
});
Galleria.on(
'thumbnail'
,
function
(e){
$(e.thumbTarget).parent().append(
'<span style ="color:#fff;">'
+(e.index+1)+
'</span>'
);
});
$(
'<a>'
).click(
function
(e) {
e.preventDefault();
gallery.toggleFullscreen();
Galleria.ready(
function
(){
var
gallery =
this
;
var
toggler = $(
'<a>'
,{
'href'
:
'#'
,
'text'
:
''
,
'class'
:
'toggler'
,
'click'
:
function
(e) {
e.preventDefault();
gallery.toggleFullscreen();
}
}).prependTo(
'.galleria-stage'
);;
this
.bind(
'fullscreen_enter'
,
function
() {
toggler.addClass(
'fullscreen'
).text(
''
);
}).bind(
'fullscreen_exit'
,
function
() {
toggler.removeClass(
'fullscreen'
).text(
''
);
});
Galleria.addTransition(
"reversePulse"
,
function
(params, complete) {
if
(params.prev) {
$(params.next).hide();
$(params.prev).css(
"opacity"
,1).show();
Galleria.utils.animate(params.prev, {
opacity: 0
},{
duration: params.speed,
complete:
function
() {
$(params.next).show();
complete();
}
});
}
});
Galleria.ready(
function
() {
var
gallery =
this
;
this
.addElement(
'play'
);
this
.appendChild(
'stage'
,
'play'
);
var
btn =
this
.$(
'play'
)
.css(
'color'
,
'white'
)
.text(
'PAUSE'
)
.click(
function
() {
gallery.playToggle();
});
this
.bind(
'play'
,
function
() {
btn.text(
'PLAY'
);
btn.addClass(
'playing'
);
}).bind(
'pause'
,
function
() {
btn.removeClass(
'playing'
);
});
this
.addIdleState(
this
.get(
'play'
), { opacity:0 });
});
Galleria.configure({
transition:
"fade"
,
transitionSpeed: 0,
});
});
</script>