﻿$(document).ready(function() {
    var sudoSlider = $("#slider").sudoSlider({
        continuous: true,
        numeric: true,
        auto: true,
        pause: 6000,
        ajax:
        [
        'Main/silderimages7.htm',
                'Main/silderimages2.htm',
        'Main/silderimages1.htm',
        'Main/silderimages3.htm',
	'Main/silderimages4.htm',
	'Main/silderimages6.htm'
        ],
        preloadAjax: 0,
        clickableAni: true,
        vertical: true,
        numericAttr: 'class="numeric"'

    }).mouseenter(function() {
        sudoSlider.stopAuto();
    }).mouseleave(function() {
        sudoSlider.startAuto();
    });
    var tleft="";
    if($("#giftlist").css("margin-left")=="0px")
    tleft="";
    else
    tleft="295";
     $('#giftlist').bxSlider({
        auto: true,
        autoHover: true,
        displaySlideQty: 3,
        speed:2000,
        pause:3000,
        left:tleft,
        startText: "",
        stopText: "",
        nextText: "",
        prevText: "",
        prevSelector:"#pre",
        prevImage:"Images/m/pre.png",
        nextSelector:"#next",
        nextImage:"Images/m/next.png"
        });
$("#nextimg").hide();
$("#previmg").hide();
        $('#giftlist').hover(
        function(){
        if($("#nextimg").css("display")=="none")
        {
        var imgnext="<img id='imgnext' src='../Images/m/next.png'/>";
        var imgpre="<img id='imgpre' src='../Images/m/pre.png'/>";
        $("#nextimg").html(imgnext);
        $("#previmg").html(imgpre);
        $("#nextimg").show();
        $("#previmg").show();
        correctpng(document.getElementById("imgnext"));
        correctpng(document.getElementById("imgpre"));
        }
        
           $("#next").show();
            $("#pre").show();
        },
        function(){
             $("#next").hide();
            $("#pre").hide();
        }
        );
        $('.bx-next').hover(
        function(){
        $("#next").show();
        },
        function(){
             $("#next").hide();
        }
        );
         $('.bx-prev').hover(
        function(){
        $("#pre").show();
        },
        function(){
            $("#pre").hide();
        }
        );
        $("#next").hover(function(){
            $(this).show();
        },
        function(){
        $(this).hide();
        }
        );
        $("#pre").hover(function(){
            $(this).show();
        },
        function(){
        $(this).hide();
        }
        );

    $(".pct_header").find("a").each(function(i) {
        $(this).hover(
            function() {
                $(".pct_header").find("a[class='pct_header_a_hover']").each(
                function() {
                    $(this).attr("class", "pct_header_a");
                    var name = $(this).attr("id");
                    $("#div" + name).hide();
                });
                $(this).attr("class", "pct_header_a_hover");
                var name = $(this).attr("id");
                $("#div" + name).show();
            });
        if (i == 0) {
            var name = $(this).attr("id");
            $("#div" + name).show();
        }
    });
//    $(".pc_top_case").hover(function() {
//        $(this).css("background", "url('../CSS/maincss/images/contentbg180.png')");
//    },
//    function() {
//        $(this).css("background", "url('../CSS/maincss/images/contentbg.png')");
//    }
//   );
   
});
