$(function() {
/*$('img.image1').data('ad-desc', '
Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.
And it contains How To Meet Ladies... What? That aint what HTML stands for? Man...
');
$('img.image1').data('ad-title', 'Title through $.datatogle');
$('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
$('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');*/
var galleries = $('.ad-gallery').adGallery({
loader_image: '../ad_gallery/loader.gif',
width: 600, // Width of the image, set to false and it will read the CSS width
height: 200, // Height of the image, set to false and it will read the CSS height
afterImageVisible: function() {
// For example, preload the next image
var context = this;
//alert(context.images[this.current_index].desc);
$(".ad-description-title").append("" + context.images[this.current_index].desc + "");
/*this.loading(true);
this.preloadImage(this.current_index + 1,
function() {
// This function gets executed after the image has been loaded
context.loading(false);
}
);*/
}
});
$('#switch-effect').change(
function() {
galleries[0].settings.effect = $(this).val();
return false;
}
);
$('#toggle-slideshow').click(
function() {
galleries[0].slideshow.toggle();
return false;
}
);
});
$(document).ready(function() {
$('.ad-slideshow-start').click();
$('#gallery').css({
margin : "-10px 0 0 20px"
});
});