﻿
/******************************************************/
// Steve - 14/10/2009
// Our New Jquery function used to hide/unhide the map
/******************************************************/
$(document).ready(function() {
    var $div = $('#cityDiv');
    var $div2 = $('#map_canvas');
    var height = $div.height();
    $div.hide().css({ height: 0 });
    $div2.hide().css({ height: 0 });


    $("#clickList").attr("disabled", "disabled");

    $('#clickMap').click(function() {
        $div.css("padding-bottom", "0px");
        //$div.show().animate({ height : height }, { duration: 500 });
        $div.show().animate({ height: height },
        {
            duration: 500, complete: function() {
                "slow", $div2.show().animate({ height: height }, { duration: 500, complete: function() { reInitialize(); }
                })
            }
        });

        $("#clickList").removeAttr("disabled");
        $("#clickMap").attr("disabled", "disabled");
        return false;
    });

    $('#clickList').click(function() {
        $div.css("padding-bottom", "8px");
        $div.animate({ height: 0 }, { duration: 500, complete: function() {
            $div.slideUp();
        }
        });
        $div2.animate({ height: 0 }, { duration: 500, complete: function() {
            $div2.hide();
        }
        });

        $("#clickMap").removeAttr("disabled");
        $("#clickList").attr("disabled", "enabled");
        return false;
    });

    $(".help").tooltip({
        track: true,
        delay: 0,
        showURL: false,
        showBody: "-"
    });

    $(".best").tooltip({
        track: true,
        delay: 0,
        showURL: false,
        showBody: "-"
    });

    $(".offer").tooltip({
        track: true,
        delay: 0,
        showURL: false,
        showBody: "-"
    });

    $(".webExc").tooltip({
        track: true,
        delay: 0,
        showURL: false,
        showBody: "-"
    });

})