
document.write('<script type="text/javascript" src="/common/js/jquery.js"></script>');
document.write('<script type="text/javascript" src="/common/js/jquery.ui.js"></script>');

function onLoadPreInit()
{
	if(typeof($isJsUnit)!="undefined") {
		if($isJsUnit == "true" && (parent.document.location + "").indexOf("testContainer") > 0) return;
	}

	if(document.location.hostname.indexOf("lge.com") != -1)	{
		document.domain = "lge.com";
	}

	$('div.footer').footer();
	$('div.menu-left').leftnav();
	$('.search-results-container').search();
}

function onLoadPostInit()
{
	if($.browser.msie && $.browser.version < 7)
	{
		$('img[src$=.png],div.footer span,div.product-content div.support ul.contact li').not('.hr').addClass('pngfix');
		$('img.hr[src$=.png]').each(function() {this.src = this.src.replace('.png','.gif');});
		$('#service-center-google-map img').removeClass('pngfix');
		$('#service-center-google-map img.gmnoprint').each(function(){this.src= this.src.replace('.gif','.png');});
		if( window.location.pathname.indexOf('/cn/') >= 0 ){$('body').addClass('cn_font_type');}
	}

	$('input[type=hidden]').css({display:'none'});
	$('.loading').remove();
	$('div.container').css({visibility:'visible'});

	$('div#left-nav-dom').trigger('leftnav:toggle');

	$('.bugClass').click(function()
	{
		window.open('/common/bug/RetrieveBugList.jsp?url='+window.location.pathname,'buglist','scrollbars=yes,width=800,height=700');
	});
	
	window.onresize = function()
	{
		try
		{
			$('div.footer').trigger('footer:resize');
			$('div.right-rail').trigger('rail:resize');
			$('.product-flagship-content').trigger('flagship:resize');
		}
		catch(e) {};
	}

	$('body').unbind('mousemove').mousemove(function(e)
	{
		try
		{
			$('div#left-nav-dom').trigger('leftnav:mouseapproach',[e.pageX,e.pageY]);
			$('.right-rail').trigger('rail:mouseapproach',[e.pageX,e.pageY]);
		} 
		catch(e) {};
	});

	try 
	{
		if(isReview){$('.product-menu .reviews').click();}
	} 
	catch(e) {};

	$('img.post-load').each(function()
	{
		this.src = $(this).attr('title');
		$(this).attr('title','');
	});
}
