﻿/// <reference path="../../Script/jquery-1.2.6.min-vsdoc.js" />

//Set Custom Video Dimention variables used in Scripts/HomeScript.js
VIDEO_WIDTH = 300;

$(document).ready(function() {
    //set bottomLeft table height if the tdRight is very tall.
    var tdRight = $('.tdRight');
    var heightOfTabAreaPlusDefaultBottomLeftContent
    if (tdRight != null) {
        var tdRightHeight = tdRight.height();
        var heightOfTabArea = 334;
        var heightOfTblBottomLeft = $('.tblBottomLeft').height();

        if (tdRight.height() > heightOfTblBottomLeft + heightOfTabArea) {

            $('.tblBottomLeft').height(tdRightHeight - heightOfTabArea);
        }
        else {
        //explicitly set this incase its own content is taller than the default css rule. This will allow the vertical dividers to stretch
            $('.tblBottomLeft').height(heightOfTblBottomLeft);
        }
    }
});

function Search() {
    var terms = $('#txtSearch').val();
    if (terms.length > 0) {
        window.open('search.aspx?q=' + terms, '_self', '');
    }
}


function GoBackToIngredient() {
    window.history.back();
}

