﻿/// <reference path="jquery-1.4.4-vsdoc.js" />
$(document).ready(function () {

    if ($('div#picListPage').length > 0) {
        var div = $('div#picListPage'), ul = $('ul#menu'), ulPadding = 15;
        var divWidth = div.width(); div.css({ overflow: 'hidden' });
        var lastLi = ul.find('li:last-child');
        var leftposition = 0 * 150; var totallength = 25 * 150;
        var temp = 0;
        if (totallength - leftposition < divWidth) {
            temp = divWidth - (totallength - leftposition);
        }
        div.scrollLeft(leftposition - temp);
        div.mousemove(function (e) {
            var ulWidth = lastLi[0].offsetLeft + lastLi.outerWidth() + ulPadding;
            var left = (e.pageX - div.offset().left) * (ulWidth - divWidth) / divWidth;
            div.scrollLeft(left);
        });

        var divT = $('div#picListPageT'), ulT = $('ul#menuT');
        var divWidthT = divT.width(); divT.css({ overflow: 'hidden' });
        var lastLiT = ulT.find('li:last-child');
        var leftpositionT = 0 * 150; var totallengthT = 25 * 150;
        var tempT = 0;
        if (totallengthT - leftpositionT < divWidthT) {
            tempT = divWidthT - (totallengthT - leftpositionT);
        }
        divT.scrollLeft(leftpositionT - tempT);
        divT.mousemove(function (e) {
            var ulWidthT = lastLiT[0].offsetLeft + lastLiT.outerWidth() + ulPadding;
            var leftT = (e.pageX - div.offset().left) * (ulWidthT - divWidthT) / divWidthT;
            divT.scrollLeft(leftT);
        });



        $(".leftfu,.right").hide(); //.hover(function () {
           // $(this).hide();
           // setTimeout(function () { $(".leftfu,.right").show() }, 5000);
       // });


        $('.pic60 > a').click(function () {
            popup({ url: $(this).attr("href"), title: '登录', width: "570", height: "400", offset_id: "" });
            return false;
        });

        resizes({ id: "textcenter", width: $(window).width() });

        $(window).resize(function () {

            resizes({ id: "textcenter", width: $(window).width() });
            popup_resize({});

        });

    }


    $("#about,.r").click(function () {

        popup({ url: $(this).attr("href") + "?id=" + Date(), title: '登录', width: "570", height: "400", offset_id: "" });

        return false;

    });

    $(".muess > a").hover(function () {

        $(this).attr("re", $(this).text());
        $(this).text($(this).attr("rel"));
        $("#top").css({ width: "385" });

    }, function () {
        $(this).attr("rel", $(this).text());
        $(this).text($(this).attr("re"));
        $("#top").css({ width: "375" });
    });


    //插入背景
    if ( !document.getElementById('popup_bg')) {
        $('<div id="popup_bg" style="background-color:#000; z-index:500;"></div>')
        .css({
            position: 'absolute',
            zIndex: 500,
            top: 0,
            left: 0,
            width: $(document).width(),
            height: $(document).height(),
            opacity: 0
        })
        .appendTo(document.body)
        .fadeTo(300, 0.9)
		.dblclick(close_popup);
        popup({ content: "<div style='color:#e8e1e1; line-height:24px; font-size:12px; le'>特别声明:<br>本公司 (升美国际模特管理机构)<br> 前职员中文名: 吴东澔, 常用名: 包包（吴包包）, 英文名: AIKO，<br>因严重违反公司守则已离开本公司一段时间，现今发现该人员仍然长期冒用本公司名义；<br>（假冒QQ名为：“升美模特面试”，QQ号为：1103823638）盗用本公司名义<br>与客户联系相关模特业务，已经为部分模特及客户带来了一定的影响和服务困扰。<br>为了维护本公司声誉及名义，维护各客户利益，请各客户单位注意。<br>如该人继续假冒本公司名义，本公司将会向该人员追究相关法律责任。<br><br>如需要模特资料或者模特面试请直接联系本公司客服. <br>客服联系方式如下: 何小姐 13570505482 <br>本公司官方客服QQ: 1531513863, QQ: 754310634, QQ: 985230771</div>", title: '登录', width: "670", height: "600", offset_id: "" });

    }


});

function ss() {
    var d = parseInt("-" + $(".tx").height())
    if ($(".tx").position().top - 460 > d) {
        $(".tx").animate({ top: '-=80' }); 
        
    }

}
function sst() {
    if ($(".tx").position().top < 0) {

        $(".tx").animate({ top: '+=80' });
    } else {
        $(".tx").position().top = 0;


    }
}

function ss1() {

    var d = parseInt("-" + $("#tx").height())
    if ($("#tx").position().top - 360 > d) {
        $("#tx").animate({ top: '-=80' }); ;
    }

}
function sst2() {
    if ($("#tx").position().top < 0) {

        $("#tx").animate({ top: '+=80' });
    } else {
        $("#tx").position().top = 0;
    }
}

