/*
 * FirstMind JavaScript Library v1.3.2
 * Copyright (c) 2009 FIRSTMIND company
 * Date: 2009-09-01
 * Revision: 6246
 */

/*------------------------------------------
  jQuery Common Module Loading
------------------------------------------ */
$(document).ready(function() {

    //---------------------------------------------------------------------------------------
    // °øÅë±â´É ¼³Á¤
    //---------------------------------------------------------------------------------------
    $('a').focus(function(e) { this.blur(); }); /* Disable Anchor Area */
    $("img").attr('align','absmiddle'); /* ÀÌ¹ÌÁö ¼¼·Î °¡¿îµ¥ Á¤·Ä */

    $('input:checkbox').css('border', 'none');
    $('input:image').css('border', 'none').css('margin', '0').css('padding', '0').attr('align','absmiddle');
    $('input:radio').css('border', 'none');
    $('input:text').css('height', '22px');

    //---------------------------------------------------------------------------------------
    // °Ë»ö¹Ú½º ¼³Á¤
    //---------------------------------------------------------------------------------------
    $('#search_keyword').css({'margin-top':'-16px'});
    $('#search_keyword input:text').css({'height':'20px'}); /* °Ë»ö Å°¿öµå */

    //---------------------------------------------------------------------------------------
    // sLink : ½ºÆä¼È¸µÅ© ¸ðÀ½
    //---------------------------------------------------------------------------------------
    $('#links #slink #top a').attr('href','#top');
    $('#links #slink #top').css({'text-align':'left', 'padding-left':'3px', 'margin-top':'10px'});
    /* $('#links #slink #top a img').click(function(e) { $(document).animate({top:0}, {duration:700}); }); */

    //$('#links #slink #s1 a').attr('href','javascript:alert("2009³â °Ü¿ïÈ£(Vol.2009-4) ÁØºñ Áß ÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä.");');
    //$('#links #slink #s2 a').attr('href','/front/php/newpage.php?code=2');
    //$('#links #slink #s3 a').attr('href','/front/php/category.php?cate_no=33');

    //---------------------------------------------------------------------------------------
    // hLink : ¹Ù·Î°¡±â¸µÅ© ¸ðÀ½
    //---------------------------------------------------------------------------------------
    /*
    $('#links #hlink').css('position','absolute');
    $('#links #hlink #m1 a').attr('href','/front/php/b/board_list.php?board_no=1');
    $('#links #hlink #m2 a').attr('href','/front/php/newpage.php?code=4');
    $('#links #hlink #m3 a').attr('href','/front/php/b/board_list.php?board_no=6');
    $('#links #hlink #m4 a').attr('href','http://www.doortodoor.co.kr/jsp/cmn/c03a_s1.jsp').attr('target','_blank');
    $('#links #hlink #m5 a').attr('href','/front/php/myshop/cons_board_list_new.php?board_no=101');
    $('#links #hlink #m6 a').attr('href','javascript:window.external.addfavorite("http://www.thebabyshop.co.kr", "[´õº£ÀÌºñ¼¥] ³»¾ÆÀÌÀÇ Æ¯º°ÇÑ½ºÅ¸ÀÏ !");');
    $('#links #hlink #m7 a').attr('href','/front/php/category.php?cate_no=39');
    $('#links #hlink #m8 a').attr('href','/front/php/category.php?cate_no=36');
    */
/* IE¿¡¼­ ¼ÓµµÀúÇÏ T.T Â¯.. ¾²Áö¸»°Í!
    $('#links #hlink #m1 img').hover( function() { this.src='/web/_html/images/links/hlink/m1_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m1.gif' } );
    $('#links #hlink #m2 img').hover( function() { this.src='/web/_html/images/links/hlink/m2_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m2.gif' } );
    $('#links #hlink #m3 img').hover( function() { this.src='/web/_html/images/links/hlink/m3_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m3.gif' } );
    $('#links #hlink #m4 img').hover( function() { this.src='/web/_html/images/links/hlink/m4_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m4.gif' } );
    $('#links #hlink #m5 img').hover( function() { this.src='/web/_html/images/links/hlink/m5_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m5.gif' } );
    $('#links #hlink #m6 img').hover( function() { this.src='/web/_html/images/links/hlink/m6_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m6.gif' } );
    $('#links #hlink #m7 img').hover( function() { this.src='/web/_html/images/links/hlink/m7_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m7.gif' } );
    $('#links #hlink #m8 img').hover( function() { this.src='/web/_html/images/links/hlink/m8_on.gif' }, function() { this.src='/web/_html/images/links/hlink/m8.gif' } );
*/

    //---------------------------------------------------------------------------------------
    // ÇÏ³ªÀºÇà ¿¡½ºÅ©·Î ¸µÅ©
    //---------------------------------------------------------------------------------------
    $("#hanaescrow").click(function(){
        var wUrl = "http://www.hanaescrow.com/hnbecc/shopDetailDirect.do?afflGrpId=GC2CCAFE00&afflShopNo=00039935";
        var wName = "hanaEscrow";
        var w=500;
        var h=440;
        win = newWin(wUrl, wName, w, h);
        win.focus();
        return false;
    }).css({'cursor':'pointer'});

});

//* º¹»ç, µå·¡±×, ÆË¾÷ ¹æÁö - ³ªÁß¿¡ ¼³Á¤ÇØÁ¦
document.oncontextmenu = function() { return false; }
document.ondragstart = function() { return false; }
document.onselectstart = function() { return false; }
//document.onkeydown = disableKeys;
//alert('..');
//*/


/*------------------------------------------
  »õÃ¢¶ç¿ì±â ÇÔ¼ö
------------------------------------------ */
function newWin(url, name, w, h, x, y, style) {
    var newUrl = url;
    var winName = name;
    var w; if(!w) { w=600; }
    var h; if(!h) { h=400; }
    if(!x) { 
        var sw=screen.width;
        var xpos=(sw-w)/2; //È­¸é Áß¾Ó °¡·Î
    } else {
        var xpos=x;
    }
    if(!y) { 
        var sh=screen.height;
        var ypos=(sh-h)/2; //È­¸é Áß¾Ó ¼¼·Î
    } else {
        var ypos=y;
    }
    if(!style) { style = "menubar=no, resizable=no, status=no, scrollbars=no"; }

    //alert( url + "\n" + name + "\n" + w + "\n" + h + "\n" + xpos + "\n" + ypos + "\n" );
    openWin=window.open(newUrl,winName,"width=" + w +",height="+ h +",top=" + ypos + ",left="+ xpos +"," + style ); //µ¿ÀûÀÎ »õÃ¢À» ¶ç¿ó´Ï´Ù.
    return openWin;
}

