/* 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;

	$('<div style="display:none"><form method="post" action="http://app.struq.com/s/df/7vtJLchVI0KNWVmUUcddtA/?v=2" target="struq_SL_frame" id="struq_SL_form"><input type="hidden" id="struq_SL_form_data" name="qs"></form><iframe name="struq_SL_frame"></iframe></div>').appendTo('body');

	$('#struq_SL_form_data').val(slc.join('&'));
	$('#struq_SL_form').submit();
});