
jQuery( document ).ready( function () {

	if ( $.browser.msie && parseInt( $.browser.version ) == 6 )
	{
		jQuery( '*:first-child' ).addClass( 'first-child' );
	}
	
	$( 'img.hovable' ).mouseenter( function () {
		if ( !$( this ).hasClass( 'selected' ) )
		{
			$( this ).attr( 'src', $( this ).attr( 'src' ).replace( /\.(jp[e]?g|gif|png)$/i, '-hover.$1' ) );
		}
	});
	$( 'img.hovable' ).mouseleave( function () {
		if ( !$( this ).hasClass( 'selected' ) )
		{
			$( this ).attr( 'src', $( this ).attr( 'src' ).replace( /\-hover\.(jp[e]?g|gif|png)$/i, '.$1' ) );
		}
	});
	
	if ( $( 'div#main-brochure' ).length == 1 )
	{
		$( 'div#main-brochure' ).easySlider({
			auto: true,
			continuous: true,
			numeric: true,
			speed: 1500,
			fade: true,
			pause: 3000
		});
	}
	
	if ( $( 'img.quotation' ).length >= 1 )
	{
		$( 'img.quotation' ).css( 'cursor', 'pointer' );
		$( 'img.quotation' ).click( function () {
			window.open( '/tools/quotations/', 'quotations', 'width=730, height=700, left=50, top=50' );
		});
	}
	
});

function findAccount ()
{
	window.open( '/member/find.php', 'findAccount','width=420,height=420,left=50,top=50');
}

function flash(url,w,h,bg,win,vars,base){
	var s=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<param name='base' value='"+base+"' />"+
	"<embed src='"+url+'?'+vars+"' base='"+base+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";
	document.write(s);
}
// flash(title)
function flash2(url,w,h,bg,win,vars,base){
	var s=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<param name='base' value='"+base+"' />"+
	"<embed src='"+url+"' base='"+base+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' align='middle' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";
	document.write(s);
}

function sub2_6 ()
{
	window.open( '/contents/pages/menu2/pop.php', 'findAccount','width=746,height=774,left=50,top=50');
}
function findAccount ()
{
	window.open( '/member/find.php', 'findAccount','width=420,height=420,left=50,top=50');
}
function go_main ()
{
	location.href="/";
}

function go_login ()
{
	location.href="/member/";
}

function go_logout ()
{
	location.href="/member/signout.php";
}

function go_join ()
{
	location.href="/member/signup.php";
}

function go_find ()
{
	findAccount();
}
function go_modify ()
{
	location.href="/member/account.php";
}

function go_admin ()
{
	location.href="/TMS/";
}
function go_leftbanner1 ()
{
	location.href="/board/?board=bbs31";
}
function go_leftbanner2 ()
{
	location.href="/board/?board=bbs33";
}
function go_leftbanner3 ()
{
	location.href="/board/?board=bbs72";
}
function go_mainbanner1 ()
{
	window.open( 'http://www.cyworld.com/artgriffin');
}
function go_mainbanner2 ()
{
	window.open( 'http://www.dicu.net/');
}

function go_sub1_2_pop ()
{
	window.open( '/contents/pages/menu1/pop.php', 'findAccount','width=680,height=600,left=50,top=50,scrollbars=yes');
}
