
/* 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++plone.app.discussion.javascripts/comments.js - */
// http://www.bdk.de/portal_javascripts/++resource++plone.app.discussion.javascripts/comments.js?original=1
(function($){$.createReplyForm=function(comment_div){var comment_id=comment_div.attr("id");var reply_button=comment_div.find(".reply-to-comment-button");var reply_div=$("#commenting").clone(true);reply_div.find("#formfield-form-widgets-captcha").find("script").remove();reply_div.appendTo(comment_div).css("display","none");reply_div.removeAttr("id");$(reply_button).css("display","none");var reply_form=reply_div.find("form");reply_form.find("input[name='form.widgets.in_reply_to']").val(comment_id);var cancel_reply_button=reply_div.find(".cancelreplytocomment");cancel_reply_button.attr("id",comment_id);reply_form.find("input[name='form.buttons.cancel']").css("display","inline");reply_div.slideDown("slow");cancel_reply_button.css("display","inline")};$.clearForm=function(form_div){form_div.find(".error").removeClass("error");form_div.find(".fieldErrorBox").remove();form_div.find("input[type='text']").attr("value","");form_div.find("textarea").attr("value","")};$(window).load(function(){var post_comment_div=$("#commenting");var in_reply_to_field=post_comment_div.find("input[name='form.widgets.in_reply_to']");if(in_reply_to_field.val()!==""){var current_reply_id="#"+in_reply_to_field.val();var current_reply_to_div=$(".discussion").find(current_reply_id);$.createReplyForm(current_reply_to_div);$.clearForm(post_comment_div)}
$(".reply-to-comment-button").bind("click", function(e){var comment_div=$(this).parents().filter(".comment");$.createReplyForm(comment_div);$.clearForm(comment_div)});$("#commenting #form-buttons-cancel").bind("click", function(e){e.preventDefault();var reply_to_comment_button=$(this).
parents().
filter(".comment").
find(".reply-to-comment-button");$.reply_to_comment_form=$(this).parents().filter(".reply");$.reply_to_comment_form.slideUp("slow", function(){$(this).remove()});reply_to_comment_button.css("display","inline")});$("input[name='form.button.PublishComment']").live('click', function(){var trigger=this;var form=$(this).parents("form");var data=$(form).serialize();var form_url=$(form).attr("action");$.ajax({type:"GET",url:form_url,data:"workflow_action=publish",context:trigger,success: function(msg){form.find("input[name='form.button.PublishComment']").remove();form.parents(".state-pending").toggleClass('state-pending').toggleClass('state-published')},error: function(msg){return true}});return false});$(".reply").find("input[name='form.buttons.reply']").css("display","none");$(".reply").find("input[name='form.buttons.cancel']").css("display","none");$(".reply-to-comment-button").css("display","inline")})}(jQuery));

/* - ++resource++as_customer.js - */
// http://www.bdk.de/portal_javascripts/++resource++as_customer.js?original=1
jq('document').ready(function(){var parents=jq('#checkout .component:has(.as_customer)');parents.each(function(){if(jq(this).find('.as_customer').is(':checked'))
jq(this).find('.address').hide()});parents.find('.as_customer').click(function(){var checkbox=jq(this);var parent=jq(this);while(!parent.find('.address').size())
parent=parent.parent();if(checkbox.is(':checked'))
parent.find('.address').hide();else
parent.find('.address').show()})});

/* - ++resource++getprice.js - */
// http://www.bdk.de/portal_javascripts/++resource++getprice.js?original=1
jq('document').ready(function(){jq('.buyViewlet select[name=cartVariation:list]').each(function(i){jq(this).find('option').each(function(i){html=jq(this).html();jq(this).html(html.substring(0,html.lastIndexOf('(')))})});if(jq('.buyViewlet select[name=cartVariation:list]').length){pcommerceLoadPrice()}
jq('.buyViewlet select[name=cartVariation:list]').change(function(){pcommerceLoadPrice()})});
function pcommerceLoadPrice(){var variations=[];jq('.buyViewlet select[name=cartVariation:list]').each(function(i){variations[i]=jq(this).attr('value')});jq('.portletInfoBox .priceInfo').load('getprice?v='+variations.join(','))}

