var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

$(document).ready(function()
{
	/*
	isIE8 = /msie|MSIE 8/.test(navigator.userAgent);
	isIE7 = /msie|MSIE 7/.test(navigator.userAgent);
	isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
	//if( !isIE8 && !isIE7 && isIE6 )*/
	if( main_isIE6 == 1 )
	{
	DD_belatedPNG.fix('#home_image, #mini_cart');
	}
	$("#dev_message a").attr('href', "mailto:webteam@restek.com?subject=Alpha Issue: " +window.location+"&body=***Web Browser: "+navigator.userAgent+" ***");
	if (document.all) {

	    $("#navigation li").hoverClass("sfHover");
	}
	 $('ul.nav').superfish({
            delay:       0,                            // one second delay on mouseout
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       1,                          // faster animation speed
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
        });

	$("#share").mouseup( function()
	{
	return false;
	});
	$("#faves").mouseup( function()
	{
	return false;
	});
	$("#home_read_more").click( function()
	{
		$(".footer_home_continue").show();
		$(this).hide();
		return false;
	});

	$("#search").submit(function() {

        $.cookie('search_tab_cookie', null,{ path: '/sitesearch/' });
		$.cookie('SpryMedia_DataTables_product_results_sitesearchsite',null,{ path: '/' });
		$.cookie('SpryMedia_DataTables_resource_results_sitesearchsite',null,{ path: '/' });
		$.cookie('SpryMedia_DataTables_chromatogram_results_sitesearchsite',null,{ path: '/' });
	});

});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover(
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};


