/* 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++as_customer.js - */
// http://www.pratifioriti.tn.it/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.pratifioriti.tn.it/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(','))}

