﻿var params = { menu: "false", wmode: "transparent", allowFullScreen: "true", allowScriptAccess: "always", scale: "showall" };
var flashvars = { Config: "/Handler/focus3.ashx" };
	 $(function () {
 swfobject.embedSWF("/Template/flash/focus3.swf", "flash2", "650px", "310px", "9", "/Flash/expressInstall.swf", flashvars, params, false);
 });
var params = { menu: "false", wmode: "transparent", allowFullScreen: "true", allowScriptAccess: "always", scale: "showall" };
var flashvars1 = { config: "/Handler/flash1.ashx" };
$(function () {
      swfobject.embedSWF("/Template/flash/flash1.swf", "flash", '100%','370',"9", "/Template/flash/expressInstall.swf", flashvars1, params, false);
    $(".scrb1").scrollable({ size: 5, items: ".scrb1 ul", loop: true }).autoscroll({ autoplay: true, interval: 4000 }).navigator({ navi: ".tab01", naviItem: 'dd', activeClass: "active" });
	$(".scrb2").scrollable({ size: 1, items: ".scrb2 ul", loop: true, prev: ".arr_hl", next: ".arr_hr" }).autoscroll({ autoplay: true, interval: 3000 });
    $(".scrb3").scrollable({ size: 4, items: ".scrb3 ul", loop: true, prev: ".arr_l", next: ".arr_r" });
    $(".scrb4").scrollable({ size: 1, items: ".scrb4 ul", loop: true, prev: ".arr_sl", next: ".arr_sr" }).autoscroll({ autoplay: true, interval: 4000 });;
    var io = 0;
    $(function () {
        $(".scrb3 li").click(function () {
            $(".bigimg").empty();
            $(".big1", this).clone().appendTo($(".bigimg"));
        });
        $(".scrb3 li:eq(0)").click();
        io = 1;
        setInterval(function () {
            $(".scrb3 li:eq(" + io + ")").click();
            io++;
            if (io >= $(".scrb3 li").length) {
                io = 0
            }
        }, 4000);
    });
    $(".scrb3 li").mousedown(function () {
        io = $(this).prevAll().length + 1
    });

    $.fn.ScrollTo = function (speed, callback) {
        var top = $(this).offset().top;
        if ('BODY' == $(this).attr('tagName')) {
            top = 0;
        }
        $('html, body').animate({ scrollTop: top }, speed, 'swing', callback);
    };

    $(".gotop").click(function () {
        var scrolltargetval = $(this).attr('href')
        if (scrolltargetval.length == 1) {
            var scrolltarget = 'body'
        }
        else {
            var scrolltarget = scrolltargetval
        }
        $(scrolltarget).ScrollTo(800);
        return false;
    })
});

