jQuery(document).ready(function license($){ $('.misc-pub-section').removeClass('misc-pub-section-last'); $('.misc-pub-section:last').addClass('misc-pub-section-last'); if ($('#license').length) { var setLicenseImage = function setLicenseImage(){ if ($('#hidden-license-deed').val() == '') { _AN_Call_show('show', $('#license-display').html('No license chosen')); } else { var img = $('').attr('href', $('#hidden-license-deed').val()).attr('alt', $('#hidden-license-name').val()).find('img').attr('src', $('#hidden-license-image').val()).attr('title', $('#hidden-license-name').val()).end(); _AN_Call_show('show', $('#license-display').html('').append(img)); } } ; window.setLicenseImage = setLicenseImage; window.setLicense = function setLicense(obj){ $('#hidden-license-deed').val(obj.deed); $('#hidden-license-image').val(obj.button); $('#hidden-license-name').val(obj.name); setLicenseImage(); } ; setLicenseImage(); } } ); jQuery(document).ready(function (){ jQuery('.license-attribution-options').change(function (){ if (jQuery('#license-other').is(':checked')) { jQuery('#attribute-other-data').removeClass('hidden'); } else { jQuery('#attribute-other-data').addClass('hidden'); } } ); } );