﻿    

    <!--    // Overture Korea
    var pathname_ = location.pathname;
    if (pathname_ == "/shopping/order_result.aspx") {
        window.ysm_customData = new Object();
        window.ysm_customData.conversion = "transId=,currency=,amount=";
        var ysm_accountid = "19L2IGFA2UVRFDL1DC8FRI729FC";
        document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' "
+ "SRC=//" + "srv1.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid
+ "></SCR" + "IPT>");
    }

    // -->

    function myPage(){
        checkLogin(function () {
            location.href = '/mypage/';
        }, "?type=myPage");
    };

    var boardTab = function (onTab, offTab) {
        
        if (onTab == "notice") {
            var tabNum = "tab01";
            var tabNum2 = "tab02";
        }
        else{
            var tabNum = "tab02";
            var tabNum2 = "tab01";
        }
        
        document.getElementById(onTab + "Tab").src = "http://img.wizwell.co.kr/Design/images/main/main_notice_"+ tabNum +"_on.jpg";
        document.getElementById("footer_board_" + onTab).style.display = "";
        
        document.getElementById(offTab + "Tab").src = "http://img.wizwell.co.kr/Design/images/main/main_notice_" + tabNum2 + "_off.jpg";
        document.getElementById("footer_board_" + offTab).style.display = "none";
    }

    function click_logout() {
        $.ajax({
            type: "POST",
            url: "/inc_/inc_logout.aspx",
            data: "",
            dataType: "html",
            success: function (msg) {
                location.href = "/";
            }
        });

        return false;
    };

    

    $(document).ready(function () {

        /*
        var appName	= navigator.appName;
        var appVersion = parseFloat(navigator.appVersion.split("MSIE")[1]);
        if(appName == "Microsoft Internet Explorer" && appVersion == 6){
			var currentPosition = parseInt($("#side_wrap").css("top"));
            $(window).scroll(function () {

                var position = $(window).scrollTop(); // 현재 스크롤바의 위치값을 반환합니다.

                $("#side_wrap").stop().animate({ "top": position + currentPosition + "px" }, 1000);

            });
		}        
        */
        

//        if ($.cookie('wizwell_today') != "") {
//            var arrary_today = $.cookie('wizwell_today').split("^");
//            var _wingToday = "<table id='content_holder' width=\"80\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";

//            for (var i = 0; i < arrary_today.length; i++) {
//                _wingToday = _wingToday + "<tr>";
//                _wingToday = _wingToday + "<td width='80' height='57' align='center'><a href='/shopping/product_detail.aspx?PID=" + arrary_today[i].split("|")[0] + "'><img src='<%= Common.UploadImgURL%>/55" + arrary_today[i].split("|")[1] + "' /></a></td>";
//                _wingToday = _wingToday + "</tr><tr><td height='3'></td></tr>";
//            }
//            _wingToday = _wingToday + "</table>"

//            $("#content_holder").html(_wingToday);
//        }

        $("#frm_search").submit(function () {
            if ($("#searchwords").val().length < 1) {
                alert("검색어를 입력해주세요!");
                $("#searchwords").focus();
                $("#searchwords").select();
                return false;
            };
        });

        $("#topMenu2 .clsOver").mouseover(function () {
            $(this).addClass('green_11_b');
        });

        $("#topMenu2 .clsOver").mouseout(function () {
            $(this).removeClass('green_11_b');
        });

        $("#topMenu3 #topMenu_sub a").each(function () {
            var image = $(this).children("img");
            var imgsrc = $(image).attr("src");

            $(this).mouseover(function () {
                var on = imgsrc.replace(/_off.jpg$/gi, "_on.jpg");
                $(image).attr("src", on);
            });

            $(this).mouseout(function () {
                $(image).attr("src", imgsrc);
            });
        });

        $("#searchwords").focus(function() {
	        $(this).val("");
        });

        $('#sliders').s3Slider({
            timeOut: 5000
        });

        

        $("#side_wrap .focus_productImg").mouseover(function(){
            var _no = $("#side_wrap .focus_productImg").index(this);
            $("#side_wrap .focus_productExplain").eq(_no).css('display', 'block');
            return false;
        });

        $("#side_wrap .focus_productImg").mouseout(function(){
            var _no = $("#side_wrap .focus_productImg").index(this);
            $("#side_wrap .focus_productExplain").eq(_no).css('display', 'none');
            return false;
        });
        
    });    

    $("#myWizTab .myWizTabImg").live("click", function() {
        $("#myWizTab .myWizA").each(function(i) {
            var str = this.className;
            if (InStr(str, "_") == "-1") {
                $("#myWizTab .myWizA").addClass('dsp_none');
            }
        });

        $("#myWizTab .myWizB").each(function(i) {
            document.getElementById("myWiz" + i).style.display = "none";
        });

        $(this.getElementsByTagName("img")[0]).removeClass('dsp_none');
        document.getElementById("my" + this.id).style.display = "inline";
        return false;
    });

    var itemHeight = 58;
    var viewItems = 3;

    function MoveUp(_no) {
        var scrolled = $("#scrolled" + _no).val() * 1;

        if (scrolled >= $("#content_scroll" + _no).attr("scrollHeight") - (itemHeight * viewItems) - 1) {
            return;
        }
        scrolled += itemHeight;
        $("#content_scroll" + _no).animate({ scrollTop: scrolled }, 200);

        $("#content_scroll" + _no + " .focus_productExplain").each(function () {
            var _margin = $(this).css("margin-top").replace("px", "");
            _margin = (_margin * 1) - itemHeight;
            $(this).css("margin-top", _margin + "px");
        });
        $("#scrolled" + _no).val(scrolled);
    }    

    function MoveDown(_no) {
        var scrolled = $("#scrolled" + _no).val() * 1;

        if (scrolled == 0) {
            return;
        }

        scrolled -= itemHeight;
        $("#content_scroll" + _no).animate({ scrollTop: scrolled }, 200);

        $("#content_scroll" + _no + " .focus_productExplain").each(function () {
            var _margin = $(this).css("margin-top").replace("px", "");
            _margin = (_margin * 1) + itemHeight;
            $(this).css("margin-top", _margin + "px");
            
        });
        $("#scrolled" + _no).val(scrolled);
    };

    var ars_open = function(_val) {
        
        try {
            _trk_clickTrace('EVT', 'ARS팝업' + _val);
        } catch (_e) { }

        window.open('/cs_center/ars01.html', 'arsInfo', 'width=750px, height=550px, menubar=no, scrollbars=no, status=no, toolbar=no, location=no');
    }
