/*---------------------------------------------------------------------------------------------------------------------*/
// opend gadget in max mode
function openGadgetMaxMode(gadget_id)
{
	alert('opens max mode for gadget id ' + gadget_id);
}
/*---------------------------------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------------------------------*/
// sets the data inside "add to" splash
function setAddToContent(gadget_id, dir_path, gadget_name, platforms_count, splash_height)
{
	var inner_height = splash_height - 130;
		
	if (platforms_count <= 6)
		inner_height = splash_height - 130;
	else
		inner_height = splash_height - 97;
	
	// set gadget icon	
	$lp('#addToDivIcon').attr('src','http://cdn.labpixies.com/'+dir_path+'/images/site_icon_sm.jpg');	
	
	// set gadget name
	//alert(escape(gadget_name));
	$lp('#addToDivName').text(gadget_name);
	
	// set platform buttons
	$lp('#addToContent').html($lp('#platformsHidden_'+gadget_id).html());
	
	// set inner height
	$lp('#addToBtnContainer').css('height',inner_height+'px')
	
	// if neede, show "more" button	
	if (platforms_count > 6)
		$lp('#addToMoreBtn').css('display','block');
	else
		$lp('#addToMoreBtn').css('display','none');
}
/*---------------------------------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------------------------------*/
// when "add to platform" button is clicked - adds 1 to the platform counter
function countPlatform(gadget_id, platform_id)
{
	var url = 'http://www.labpixies.com/count_platform.php?id='+gadget_id+'&platform_id='+platform_id;	
	$lp.get(url);
}
/*---------------------------------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------------------------------*/
function preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
/*---------------------------------------------------------------------------------------------------------------------*/
