$(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 $.data');
$('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();
$('#switch-effect').change(
function() {
galleries[0].settings.effect = $(this).val();
return false;
}
);
$('#toggle-slideshow').click(
function() {
galleries[0].slideshow.toggle();
return false;
}
);
$('#toggle-description').click(
function() {
if(!galleries[0].settings.description_wrapper) {
galleries[0].settings.description_wrapper = $('#descriptions');
} else {
galleries[0].settings.description_wrapper = false;
}
return false;
}
);
});