/* Author:

*/


$(document).ready(function(){
	
	// Run Matt Kersley's jQuery Responsive menu plugin (see plugins.js)
	if ($.fn.mobileMenu) {
		$('ol#id').mobileMenu({
			switchWidth: 768,                   // width (in px to switch at)
			topOptionText: 'Choose a page',     // first option text
			indentString: '&nbsp;&nbsp;&nbsp;'  // string for indenting nested items
		});
	}

	// Run Mathias Bynens jQuery placeholder plugin (see plugins.js)
	if ($.fn.placeholder) {
		$('input, textarea').placeholder();		
	}
	
(function (a) {
    a.effects.fade = function (b) {
        return this.queue(function () {
            var f = a(this),
                e = a.effects.setMode(f, b.options.mode || "hide");
            f.animate({
                opacity: e
            }, {
                queue: false,
                duration: b.duration,
                easing: b.options.easing,
                complete: function () {
                    b.callback && b.callback.apply(this, arguments);
                    f.dequeue()
                }
            })
        })
    }
})(jQuery);

(function (a) {
    a.effects.highlight = function (b) {
        return this.queue(function () {
            var c = a(this),
                h = ["backgroundImage", "backgroundColor", "opacity"],
                i = a.effects.setMode(c, b.options.mode || "show"),
                g = {
                    backgroundColor: c.css("backgroundColor")
                };
            if (i == "hide") {
                g.opacity = 0
            }
            a.effects.save(c, h);
            c.show().css({
                backgroundImage: "none",
                backgroundColor: b.options.color || "#ffff99"
            }).animate(g, {
                queue: false,
                duration: b.duration,
                easing: b.options.easing,
                complete: function () {
                    i == "hide" && c.hide();
                    a.effects.restore(c, h);
                    i == "show" && !a.support.opacity && this.style.removeAttribute("filter");
                    b.callback && b.callback.apply(this, arguments);
                    c.dequeue()
                }
            })
        })
    }
})(jQuery);

$.fn.welcomeMsg = function () {
    var b = $(this).data("effect");
    var c = parseInt($(this).data("speed"));
    var a = parseInt($(this).data("duration"));
    if (b == "slide") {
        if (a > 0) {
            $(this).show("slide", {
                direction: "right"
            }, c).delay(a).hide("slide", {
                direction: "left"
            }, c, function () {
                $(this).next().welcomeMsg()
            })
        } else {
            $(this).show("slide", {
                direction: "right"
            }, c, function () {
                $(this).next().welcomeMsg()
            })
        }
    } else {
        if (b == "fade") {
            if (a > 0) {
                $(this).show("fade", c).delay(a).hide("fade", c, function () {
                    $(this).next().welcomeMsg()
                })
            } else {
                $(this).show("fade", c, function () {
                    $(this).next().welcomeMsg()
                })
            }
        }
    }
};

(function (g) {
    var f = window.History;
    g("#logo").delay(1200).fadeIn(800);
    g("#logo").next().delay(2000).welcomeMsg();
})(jQuery);
	
});








