
document.write('<style type="text/css">a.sub-tab{position:absolute;}.tab-benefit{overflow:hidden !important;}.sub-nav .sub-tab-wrapper{display:none;position:absolute;}.sub-nav .list div{display:none;position:absolute;}.list li{height:22px;}</style>');


$(document).ready(function() {


    //benefits Default
   $("#team-member .sub-tab-wrapper").fadeIn(500);
   //$("#benefit-box").fadeIn(500);
   //$("#benefit-box").html($("#team-member .list li:first-child div").html());

    $("#team-member .sub-tab").addClass("active");

    $(".sub-tab").click(function() {

        $(".sub-tab").removeClass("active");
        var vID = $(this).parent().attr("id");
        $(".sub-nav .sub-tab-wrapper").hide();

        $("#" + vID + " .sub-tab-wrapper").fadeIn(500);
        $("#benefit-box").html($("#" + vID + " .list li:first-child div").html());

        $("#" + vID + " .sub-tab").addClass("active");
        //alert(vID);
    });

    $(".tab-corporate").click(function() {

      
        $("#corporate .sub-tab-wrapper").fadeIn(500);
        $("#benefit-box").hide();
        $("#benefit-box").html($("#team-member .list li:first-child div").html());

    });


    $(".list li").click(

     function() {

         //alert("a");
         //$("#benefit-box").hide();
         $("#benefit-box").html($(this).find('div').html());
         $("#benefit-box").fadeIn(300);
         //$(this).find('div').show();
     }

    );

    $(".pod_span_1").click(function() {
        if (this.id.indexOf("jobsearch") != -1) { location.href = "jobsearch.aspx"; }
        else if (this.id.indexOf("benefits") != -1) { location.href = "benefits.aspx"; }
        else if (this.id.indexOf("locations") != -1) { location.href = "locations.aspx"; }
        else if (this.id.indexOf("video") != -1) { location.href = "video.aspx"; }
        else if (this.id.indexOf("everify") != -1) {location.href = "everify.aspx"; }
    });

    if (jQuery.browser.version == "6.0") //dropdown/listbox hack only for IE6
    {
        $('#GlobalHeader').mouseenter(function() {
            var elemCatg = $("#ddlSearchCategory");
            if (elemCatg.length != 0) {
                elemCatg.hide();
            }
            var elemState = $(".find_bk_state");
            if (elemState.length != 0) {
                elemState.hide();
            }
            var elemIRState = $(".in_rest_state");
            if (elemIRState.length != 0) {
                elemIRState.hide();
            }
            var elemCorpSearch = $("#RemotePage");
            if (elemCorpSearch.length != 0) {
                elemCorpSearch.hide();
            }

            var elemApplyTimeStart1 = $("#ctl00_CphSpan4Content_ddlMonStart");
            if (elemApplyTimeStart1.length != 0) {
                $("#ctl00_CphSpan4Content_ddlMonStart").hide();
                $("#ctl00_CphSpan4Content_ddlTueStart").hide();
                $("#ctl00_CphSpan4Content_ddlWedStart").hide();
                $("#ctl00_CphSpan4Content_ddlThuStart").hide();
                $("#ctl00_CphSpan4Content_ddlFriStart").hide();
                $("#ctl00_CphSpan4Content_ddlSatStart").hide();
                $("#ctl00_CphSpan4Content_ddlSunStart").hide();
                $("#ctl00_CphSpan4Content_ddlMonEnd").hide();
                $("#ctl00_CphSpan4Content_ddlTueEnd").hide();
                $("#ctl00_CphSpan4Content_ddlWedEnd").hide();
                $("#ctl00_CphSpan4Content_ddlThuEnd").hide();
                $("#ctl00_CphSpan4Content_ddlFriEnd").hide();
                $("#ctl00_CphSpan4Content_ddlSatEnd").hide();
                $("#ctl00_CphSpan4Content_ddlSunEnd").hide();
            }


        });

        $('#GlobalHeader').mouseleave(function() {
            var elemCatg = $("#ddlSearchCategory");
            if (elemCatg.length != 0) {
                elemCatg.show();
            }
            var elemState = $(".find_bk_state");
            if (elemState.length != 0) {
                elemState.show();
            }
            var elemIRState = $(".in_rest_state");
            if (elemIRState.length != 0) {
                elemIRState.show();
            }
            var elemCorpSearch = $("#RemotePage");
            if (elemCorpSearch.length != 0) {
                elemCorpSearch.show();
            }

            var elemApplyTimeStart1 = $("#ctl00_CphSpan4Content_ddlMonStart");
            if (elemApplyTimeStart1.length != 0) {
                $("#ctl00_CphSpan4Content_ddlMonStart").show();
                $("#ctl00_CphSpan4Content_ddlTueStart").show();
                $("#ctl00_CphSpan4Content_ddlWedStart").show();
                $("#ctl00_CphSpan4Content_ddlThuStart").show();
                $("#ctl00_CphSpan4Content_ddlFriStart").show();
                $("#ctl00_CphSpan4Content_ddlSatStart").show();
                $("#ctl00_CphSpan4Content_ddlSunStart").show();
                $("#ctl00_CphSpan4Content_ddlMonEnd").show();
                $("#ctl00_CphSpan4Content_ddlTueEnd").show();
                $("#ctl00_CphSpan4Content_ddlWedEnd").show();
                $("#ctl00_CphSpan4Content_ddlThuEnd").show();
                $("#ctl00_CphSpan4Content_ddlFriEnd").show();
                $("#ctl00_CphSpan4Content_ddlSatEnd").show();
                $("#ctl00_CphSpan4Content_ddlSunEnd").show();
            }

        });
    }

});

function selectNav(divElement)
{
}    

var nav_status = false;
function updateNavMouseOverStatus(ctrDiv)
{
    if(ctrDiv.className.indexOf("off")!=-1){
        ctrDiv.className=ctrDiv.className.replace("off","on");
        nav_status = false;
    }
    else{nav_status = true;}
}

function updateNavMouseOutStatus(ctrDiv)
{
    if(!nav_status){
        if(ctrDiv.className.indexOf("off")!=-1)
        {
            ctrDiv.className=ctrDiv.className.replace("off","on");
        }
        else{ctrDiv.className=ctrDiv.className.replace("on","off");}
    }
}

function SelectSearchCategory()
{
    var dropdownIndex = document.getElementById('ddlSearchCategory').selectedIndex;
    var dropdownValue = document.getElementById('ddlSearchCategory')[dropdownIndex].value;
    if(dropdownValue=="")
    {
        alert("Please select a value from 'Category' and Submit again.");
        return false;
    }
    if(dropdownValue=="1"){document.location.href="jobsearch-corporate.aspx";}
    else if(dropdownValue=="2"){document.location.href="jobsearch-in-restaurant.aspx";}
}
		
function backToHome(){document.location.href="/default.aspx";}

function playVideo(videoNumber)
{
    if(videoNumber==1){createFlashSWF(447,401,"http://www.youtube.com/v/SjJqSSxeUKQ&amp;hl=en_US&amp;fs=1?border=0","flashVideoContent");}
    else if(videoNumber==2){createFlashVideo(447,401,"/media/BK_Day_in_the_Life_Video.flv","flashVideoContent");}
}

function createFlashVideo(vWidth,vHeight,vFLV,vContainer) 
{
	var flashvars = false;
	var params = {
	    codebase: "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'",
	    quality: "high",
	    menu: "false",
	    align: "middle",
        wmode: "transparent",	
        scale: "noScale",    
        bgcolor: "transparent",
        salign: "TL",
	    flashvars : "videoURL="+vFLV+"&autoPlay=true&startPhotoSource=images/home/home_video_thump.gif&hideControls=false&backgroundColor1=0x333333&backgroundColor2=0x222222"
	};
	var attributes = {};
	swfobject.embedSWF("/media/Player.swf", vContainer, vWidth, vHeight, "8", "media/app_expressinstall.swf", flashvars, params, attributes);
}

function createFlashSWF(vWidth,vHeight,vSWF,vContainer) 
{
	var flashvars = false;
	var params = {
	    codebase: "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'",
	    quality: "high",
	    menu: "false",
	    align: "middle",
        wmode: "transparent",	
        scale: "noScale",    
        bgcolor: "transparent",
        salign: "TL",
	    flashvars : ""
	};
	var attributes = {};
	swfobject.embedSWF(vSWF, vContainer, vWidth, vHeight, "8", "media/app_expressinstall.swf", flashvars, params, attributes);
}


function showLocationTab2()
{
     var tabH1 = document.getElementById('tab_a1');
     var tabH2 = document.getElementById('tab_a2');
     tabH1.className="";
     tabH2.className="selected";
     var tab1 = document.getElementById('tab1');
     tab1.style.display="none";
     var tab2 = document.getElementById('tab2');
     tab2.style.display = "block";
}

function closeVideo()
{
    //Forcefull stop of the video play
    createFlashVideo(10,10,"/media/blank.flv","flashVideoContent");
}
