function show_lightbox(id)
{
	var isIE = !$.support.opacity;
	var isIE6 = isIE && !window.XMLHttpRequest;
	if(!isIE6) {
		$("#hidden_panel").attr("class", "hp_show");
		$("#dl_login_panel").attr("class", "dlp_show");
		$("#forward").val("/downloadlanding.html?id="+id);
		$("#downloadid").val(id);
	}
}

$(function(){
	$(".dl_pu").click(function(){
		var id=this.id.split("_");
		show_lightbox(id[1]);
		return false;
	});
	$("#dl_login_panel_cl").click(function() {
		$("#hidden_panel").attr("class", "hp_hide");
		$("#dl_login_panel").attr("class", "hp_hide");
		return false;
	});
	$(".dl_login_btn").click(function(){
		$("#dl_login_frm").submit();
	});
	$(".dl_jn_btn").click(function(){
		var id=$("#downloadid").val();
		window.location='/register.html?ref=serif_dl&dl_id=' + id;
	});
});

function getParameterByName( name )
{
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
		return "";
	else
		return results[1];
}
