jQuery(document).ready(function(){
var items=jQuery('#strutture span');
if(items.length==2)
{
jQuery.post(
    // see tip #1 for how we declare global javascript variables
    strutture.url,
    {
        // here we declare the parameters to send along with the request
        // this means the following action hooks will be fired:
        // wp_ajax_nopriv_myajax-submit and wp_ajax_myajax-submit
        action : 'elenco_strutture',
		c1:$(items[0]).html(),
		c2:$(items[1]).html()
    },
    function( data ) {
        $('#strutture').html(data);
	//	$('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', strutture.colorbox_css) );
		$.getScript(strutture.colorbox_js,function(){
		$('.box a.zoom').colorbox({width:"972px", height:"600px",iframe:true,scrolling:false});
		
		});
    }
);
}
});
