$(function () 
{
	$("#headerminimenu .grabhandle").bind("mouseover", function(e)
	{
		$('#headerminimenu .menucontent').show();
    });
	$("#headerminimenu .menucontent").bind("mouseleave", function(e)
	{
		$('#headerminimenu .menucontent').hide();
    });
	
	$('.transparent').supersleight({shim: 'transparent.gif'});
	$(".tab_content").hide();
	$("ul.tabs li:first").addClass("active").show();
	$(".tab_content:first").show(); 
	$("ul.tabs li").click(function() 
	{
		$("ul.tabs li").removeClass("active"); 
		$(this).addClass("active");
		$(".tab_content").hide();
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});
	
	$("a#single_image").fancybox();
	$("a.screenshots").fancybox({'titlePosition':'inside'});	
	
	$(".accordion").accordion({ collapsible: true,active: false,autoHeight: false });

	
	$('.oneonone').bind("click", function(e)
	{
		var tsTimeStamp= new Date().getTime();
		$('#callbackform').jqm({ajax: 'http://'+servername+'/dialog_callbackform.asp?subject=1-on-1%20Demo%20Request&productid=' + productid + '&ts='+tsTimeStamp}).draggable({ handle: '.dialogheader'});			
		$('#callbackform').jqmShow(); 
		e.preventDefault();
	});	
	
	
	$('.buylink').bind("click", function(e)
	{
		var subproductid = $(this).attr('rel');
		var tsTimeStamp= new Date().getTime();
		$('#basketqtyform').jqm({ajax: 'http://'+servername+'/dialog_basketqtyform.asp?subproductid=' + subproductid + '&ts='+tsTimeStamp}).draggable({ handle: '.dialogheader'});			
		$('#basketqtyform').jqmShow(); 
		e.preventDefault();
	});		
	
	
});



