﻿

$(document).ready(function() {
    var scrolling = true;
    searchpnldown = function() {
        $(".searchpl").animate({
            top: 0
        }, 1500);
    }
    searchpnlup = function() {
        $(".searchpl").animate({
            top: -355
        }, 1500);
    }

    $(".searchbtn2").click(function() {
        if (scrolling) {
            $(".searchpl").stop();
            searchpnldown();
            $(".searchbtn2").css({ "background-position": "0px -75px", "color": "#333333" });
            $(".searchbtn2 span").css({ "color": "#333333" });
            scrolling = false;
        }
        else {
            $(".searchpl").stop();
            searchpnlup();
            $(".searchbtn2").css({ "background-position": "0px 0px", "color": "White" });
            $(".searchbtn2 span").css({ "color": "White" });
            scrolling = true;
        }
        return false;
    });

    $(".searchbtn2").mouseup(function() {
    }).mousedown(function() {
        $(".searchbtn2").css({ "background-position": "0px -50px", "color": "White" });
        $(".searchbtn2 span").css({ "color": "White" });
    });

    $(".searchbtn2").hover(function() {
        if (!scrolling) {
            $(".searchbtn2").css({ "background-position": "0px -25px", "color": "White" });
            $(".searchbtn2 span").css({ "color": "White" });
        }
        else {
            $(".searchbtn2").css({ "background-position": "0px -25px", "color": "White" });
        }
    }, function() {
        if (!scrolling) {
            $(".searchbtn2").css({ "background-position": "0px -75px", "color": "#333333" });
            $(".searchbtn2 span").css({ "color": "#333333" });
        }
        else {
            $(".searchbtn2").css({ "background-position": "0px 0px", "color": "White" });
        }
    });

    $(".searchpl").hover(function() {
        $(this).toggleClass("searchplhover", true);
    }, function() {
        $(this).toggleClass("searchplhover", false);
    });

    $(".hmtitlese").hover(function() {
        $(this).toggleClass("hmtitleseef", true);
    }, function() {
        $(this).toggleClass("hmtitleseef", false);
    });

    $(".selist").hover(function() {
        $(this).toggleClass("selistho", true);
        $(this).find(".bookinglink1").css({ "background-position": "0px -25px", "color": "White" });
    }, function() {
        $(this).toggleClass("selistho", false);
        $(this).find(".bookinglink1").css({ "background-position": "0px -75px", "color": "#333333" });
    });

    $(".bookinglink1").mouseup(function() {
    }).mousedown(function() {
        $(this).css({ "background-position": "0px -50px", "color": "White" });
    });
    $(".bookinglink1").hover(function() {
        $(this).css({ "background-position": "0px 0px", "color": "White" });
    }, function() {
        $(this).css({ "background-position": "0px -25px", "color": "White" });
    });

    $(".gvpricelist tr").hover(function() {
        if ($(this).find("td a").attr("href")) {
            $(this).find("td").toggleClass("hocss", true);
        }
    }, function() {
    $(this).find("td").toggleClass("hocss", false);
    });

    $(".gvpricelist tr").click(function() {
        if ($(this).find("td a").attr("href")) {
            location.href = $(this).find("td a").attr("href");
        }
    });

    $(".diffdeparturetime tr").live({
        click: function() {
                if ($(this).find("td a").attr("href")) {
                    location.href = $(this).find("td a").attr("href");
                }
        },
        mouseover: function() {
        if ($(this).find("td a").attr("href")) {
            $(this).toggleClass("hocss", true);
        }
        },
        mouseout: function() {
        $(this).toggleClass("hocss", false);
        }
    });

});

