/*
------------------------------------------------
  Copying, using or distrubuting of this code is not allowed without written permission of Triloxigen BV.
  For more information see http://teknology.nl
  Triloxigen BV / Teknology BV
------------------------------------------------
*/

jQuery(document).ready(function(){
	jQuery("#place").css('display', 'inline');
	var identifier = 1 + Math.floor((Math.random()*32767))

	jQuery.get("/teknology/callme.php?blackhole=" + identifier, function(data){
		jQuery(".callme").html(data);
	});
});



function show_subgroups(item)
{
	jQuery('.subgroups').css('display', 'none');
	jQuery('#subgroup_' + item).fadeIn('fast');
}




// for objects
function tabber(group, item)
{
	jQuery('.' + group).css('display', 'none');
	jQuery('#' + item).fadeIn('fast');

	jQuery('a.tabs_' + group).removeClass('active');
	jQuery('a#tab_' + item).addClass('active');
}

//callme
function callme(token, send)
{
	if (send == true)
	{
		jQuery("#callme_" + token + "_location > a").html("<img src='/teknology/images/loading.gif' />");
		var name = jQuery("#callme_" + token + "_name").val();
		var number = jQuery("#callme_" + token + "_number").val();
		var title = jQuery("title").text();
		var ref = location.href;

		jQuery.post("/teknology/callme.php", { name: name, number: number, title: title, ref:ref },
		  function(data){
			jQuery("#callme_" + token + "_location").html(data);
		  });
	}

}