function offSearch() {
    if ($(this).val() == "") {
        $(this).css("color", "gray");
        $(this).val("Search")
    } 
}
function onSearch() {
    if ($(this).val() == "Search") {
        $(this).css("color", "black");
        $(this).val("")
    } 
}
$(document).ready(function() {
$("input.search").blur(offSearch);
$("input.search").focus(onSearch);
$("input.search").trigger("blur");
if (typeof writeHeroImages != "undefined") {
    writeHeroImages()
}
if ($("#rawcutBlock").length > 0) {
    $.fn.cycle.transitions.tweakwipe = function(n, j, c) {
    var m = n.css("overflow", "hidden").width();
    var g = n.height();
    c.cssBefore = c.cssBefore || {};
    var e; if (c.clip) {
    if (/l2r/.test(c.clip)) {
        e = "rect(0px 0px " + g + "px 0px)"
    }
    else {
        if (/r2l/.test(c.clip)) {
            e = "rect(0px " + m + "px " + g + "px " + m + "px)"
        }
        else {
            if (/t2b/.test(c.clip)) {
                e = "rect(0px " + m + "px 0px 0px)"
            }
            else {
                if (/b2t/.test(c.clip)) {
                    e = "rect(" + g + "px " + m + "px " + g + "px 0px)"
                }
                else {
                    if (/zoom/.test(c.clip)) {
                        var o = parseInt(g / 2);
                        var f = parseInt(m / 2);
                        e = "rect(" + o + "px " + f + "px " + o + "px " + f + "px)"
                    } 
                } 
            } 
        } 
    } 
}
c.cssBefore.clip = c.cssBefore.clip || e || "rect(0px 0px 0px 0px)";
var i = c.cssBefore.clip.match(/(\d+)/g);
var o = parseInt(i[0]), a = parseInt(i[1]), k = parseInt(i[2]), f = parseInt(i[3]);
c.before.push(function(s, h, q) {
if (s == h) {
    return
} var d = $(s).css("zIndex", 0);
var b = $(h).css({ zIndex: 1, display: "block" });
var p = 1, l = parseInt((q.speedIn / 20)) - 1;
function r() {
    var u = o ? o - parseInt(p * (o / l)) : 0;
    var v = f ? f - parseInt(p * (f / l)) : 0;
    var w = k < g ? k + parseInt(p * ((g - k) / l || 1)) : g;
    var t = a < m ? a + parseInt(p * ((m - a) / l || 1)) : m;
    b.css({ clip: "rect(" + u + "px " + t + "px " + w + "px " + v + "px)" });
    (p++ <= l) ? setTimeout(r, 20) : d.css("display", "none")
} r()
});
c.cssAfter = {};
c.animIn = { left: 0 };
c.animOut = { left: 0}
};
currentslide = 0;
if ($.browser.msie && $.browser.version < 7) {
    $("#rawcutBlock").cycle({ fx: "scrollUp", easing: "easeOutQuad", speed: 1000, timeout: 0 })
}
else {
    $("#rawcutBlock").cycle({ fx: "tweakwipe", clip: "b2t", speed: 390, timeout: 0 })
}
$("#rawcutText").cycle({ fx: "scrollUp", easing: "easeOutQuad", speed: 1000, timeout: 0 });
$("#rawcutImage").cycle({ fx: "fade", speed: 1000, timeout: 20000, before: function(c, b, a) {
/* change the timeout period here to speed up/slow down delay between pages */
$("#rawcutBlock").cycle(currentslide);
$("#rawcutText").cycle(currentslide);
currentslide = (currentslide + 1) % 6
}, pagerClick: function(b, a) { currentslide = b }, pager: "#rawcutLinks", pagerAnchorBuilder: function(b, a) { return "a#rawcutlink" + b } 
});
currentslide = 0; $("#rawcutImage").cycle(0)
}
});

function initTabbedPanel(a, b, c) {
    $("#" + a).find("a").each(function(d) {
    $(this).click(function() {
    $("#" + b).html(c[d]);
    $("#" + a).find("li").each(function(e) {
        if (
        $(this).hasClass("firstselected")) {
            $(this).removeClass("firstselected");
            $(this).addClass("first")
        } if (
        $(this).hasClass("selected")) {
        $(this).removeClass("selected")
    } 
});
if ($(this).parent().hasClass("first")) {
    $(this).parent().removeClass("first");
    $(this).parent().addClass("firstselected")
}
else {
    $(this).parent().addClass("selected")
} return false
})
});
     $("#"+a+" a:first").click()};
