﻿//************按钮**********///
$(".btn_2").hover(
  function () {
    $(this).css({ "background-position": "-500px -180px"});
  }

);
$(".btn_4").hover(
  function () {
    $(this).css({ "background-position": "-500px -210px"});
  }
);

//*********colorbox*************//
//Close
function dialog_close(){
  $.fn.colorbox.close();
}
//Demo
function dialog_to_iframeDemo(){
       $.fn.colorbox({href:"/demo_html_1.html",iframe:true, innerWidth:340, innerHeight:340});
}
//Demo iframe里面打开iframe 并且带自定义滚动条
function dialog_to_iframeDemo2(){
       $.fn.colorbox({href:"/demo.html",iframe:true, innerWidth:1000, innerHeight:700});
}
//子菜单
function dialog_to_HowToDaning(){
    $.fn.colorbox({href:"/how-to-daning.html",iframe:true, innerWidth:987, innerHeight:660});
}
function dialog_to_BuildingGuide(){
    $.fn.colorbox({href:"/build_guide.php",iframe:true, innerWidth:960, innerHeight:653});
}
function dialog_to_FloorGuide(id){
    parent.$.fn.colorbox({href:"/park_show.php?park_id=" + id + "&t="+ Math.random(),iframe:true, innerWidth:900, innerHeight:600, scrolling:false});
}

function dialog_to_Brand(){
    $.fn.colorbox({href:"/brand.php",iframe:true, innerWidth:960, innerHeight:653});
}

function dialog_to_ParkingGuide(){
    $.fn.colorbox({href:"/parking-guide.html",iframe:true, innerWidth:960, innerHeight:653});
}

function dialog_to_show_buildGuide(id){
    $.fn.colorbox({href:"/build_guide.php?id=" + id + "&t="+ Math.random(), iframe:true, innerWidth:440, innerHeight:400,opacity:0});
}

function dialog_to_show_buildGuideFloor(id, floorNum){
    window.location = "/build_guide_floor.php?id="+ id + "&floorNum=" + floorNum + "&t="+ Math.random();
}

function show_sales_where(id, floorNum){
    //dialog_to_BuildingGuide();
    $.fn.colorbox({href:"/sales_guide.php?id=" + id + "&floorNum=" + floorNum + "&t="+ Math.random(),iframe:true, innerWidth:960, innerHeight:653});
    //alert(id);alert(buildNum);
    //$.fn.colorbox({href:"/build_guide_floor.php?id=" + id + "&floorNum=" + floorNum + "&t="+ Math.random(), iframe:true, innerWidth:458, innerHeight:400});
    //alert(id);alert(floorNum);
}

//登录 注册 找回密码 订阅
function dialog_to_Login(){
       $.fn.colorbox({href:"/login.html?t=" + Math.random()});
}

function dialog_to_Regsiter(){
       $.fn.colorbox({href:"/register.html?t=" + Math.random()});
}

function dialog_to_Regsiter_2(){
       $.fn.colorbox({href:"/register-2.html?t="+ Math.random()});
}

function dialog_to_Regsiter_FromCN(){
       $.fn.colorbox({href:"/register_cn.html?t=" + Math.random()});
}

function dialog_to_Regsiter_FromCN_2(){
       $.fn.colorbox({href:"/register_cn-2.html?t="+ Math.random()});
}

function dialog_to_ForgetPassword(){
       $.fn.colorbox({href:"/forget-password.html?t="+ Math.random()});
}

function dialog_to_ForgetPassword_2(e){
       $.fn.colorbox({href:"/user/forgetpassword2.php?e="+ e + "&t="+ Math.random()});
}

function dialog_to_EmailSub(){
       $.fn.colorbox({href:"/email-sub.html?t="+ Math.random()});
}

function dialog_to_EmailSub_2(){
       $.fn.colorbox({href:"/email-sub-2.html?t="+ Math.random()});
}

function dialog_to_salesShare(id){
       $.fn.colorbox({href:"/sales/salesShare.php?id=" + id + "&t="+ Math.random()});
}

function dialog_to_memberEventShare(id){
       $.fn.colorbox({href:"/member/memberEventShare.php?id=" + id + "&t="+ Math.random()});
}

function dialog_to_eventShare(id,type){
    $.fn.colorbox({href:"/events/eventShare.php?id=" + id + "&type=" + type + "&t="+ Math.random()});
}
function dialog_to_historyDetail(id){
    $.fn.colorbox({href:"/events/historyDetail.php?id=" + id + "&t="+ Math.random(),iframe:true, innerWidth:810, innerHeight:440});
}
function dialog_to_jobShare(id){
    $.fn.colorbox({href:"/jobs/jobDetail.php?id=" + id + "&t="+ Math.random(),iframe:true, innerWidth:620, innerHeight:500});
}

function dialog_to_soonDetail(id){
    //$.fn.colorbox({href:"/events/soonDetail.php?id=" + id + "&t="+ Math.random(),iframe:true, innerWidth:560, innerHeight:340});
	$.fn.colorbox({href:"/events/soonDetail.php?id=" + id + "&t="+ Math.random(),iframe:true, innerWidth:810, innerHeight:440});
}
function dialog_to_job(id){
    window.location = "/jobs/list.php";
}
window.onerror=function(){return true;}

