
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ++resource++zindex-javascripts/downloads.js - */
// http://www.z-index.nl/portal_javascripts/++resource++zindex-javascripts/downloads.js?original=1
jq(document).ready(function(){jq("#download-filter input[type='submit']").hide() ;jq("#download-filter select").change(function(){jq("#download-filter").submit()});jq("#alternative-download").click(function(){jq("#download-filter").submit()})});

/* - ++resource++zindex-javascripts/credentials.js - */
// http://www.z-index.nl/portal_javascripts/++resource++zindex-javascripts/credentials.js?original=1
jq(document).ready(function(){jq("a.credentials-required").click(function(){var credentials=zindex_credentials_base64;var url=jq(this).attr('href');console.log(url);jq.ajax({"async":false,"url":url,"beforeSend": function(xhr){xhr.setRequestHeader("Authorization","Basic "+credentials)},"succes": function(val){}})})});

/* - ++resource++zindex-javascripts/filelinks.js - */
// http://www.z-index.nl/portal_javascripts/++resource++zindex-javascripts/filelinks.js?original=1
function filesinnewwindow(){var filetypes=['pdf','doc'];var contentarea=jq(getContentArea());contentarea.find('a[href*=.]').each( function(index){var node=jq(this);var link=node.attr('href');var extension=link.substr(link.length-3,3);for(var i=0;i++;i<filetypes.length){if(extension==filetypes[i]){jq(this).attr('target','_blank')}}})};

