/* Copyright (C) 2008-2009 by Struq */
/* Struq SL v2 (jquery) */

$(document).ready(function() {
	var slc = [];

	$('.struq_SL_DF_container').each(function() {
		var items = [];
		var ckey = $(this).attr('title');

		$(this).find('.struq_SL_DF').each(function() {
			var pn = $(this).attr('title');
			var pv = $(this).text();
			items[items.length] = encodeURIComponent(pn) + '=' + encodeURIComponent(pv);
		});

		slc[slc.length] = ckey + "=" + (items.join('|'));
	});

	if (slc.length == 0)
		return;

	var url = 'http://app.struq.com/s/s/4hOECrFgJ0aukW94hpDQnQ/'
		+ '?v=2&qs=' + encodeURIComponent(slc.join('&'))
		+ '&rnd=' + parseInt(Math.random() * 10000000000000000);

	$("body").append('<iframe src="' + url + '" style="display:none" />');

});