/**
 * @author    mutexkid
 * @version   1.0
 * @copyright copyright (c)2009 Josh Skeen
 * @website   http://www.joshskeen.com
 * @license   MIT License : http://en.wikipedia.org/wiki/MIT_License
 * 			  requires jquery 1.3+
 * mod by rondu 1/28/2010 - Added display attributes to slides to show hidden images
 */
; (function(a) {
	var b, i = 0, c = 0, e = Array(); a.fn.simpleslide = function(d) {
		function h() {
			b = d; c = b.startingSlide; var f = { width: b.frameWidth + "px", height: b.frameHeight + "px" }, j = { width: b.frameWidth - 8 + "px", height: b.frameWidth - 4 + "px" }; $this.wrapAll('<div id="jquery_simpleslide"></div>'); e = $this.children("img"); i = $this.children("img").length - 1; $this.children("img").addClass("simpleslide_slide"); a("#jquery_simpleslide").css(f); a("#jquery_simpleslide .simpleslide_slide").css(f); a("jquery_simpleslide"); if (b.labels == true) {
				a("#jquery_simpleslide").append('<div id="simpleslide_titlebar"><div class="simpleslide_title_bg"></div><div class="simpleslide_title_copy">foo</div></div>');
				a("#jquery_simpleslide #simpleslide_titlebar").css(f).css("height", b.titlebarHeight + "px"); a("#jquery_simpleslide .simpleslide_title_bg").css(f).css("height", b.titlebarHeight + "px"); a("#jquery_simpleslide .simpleslide_title_copy").css(j); f = b.labelPosition == "bottom" ? b.frameHeight - b.titlebarHeight : 0; a("#jquery_simpleslide #simpleslide_titlebar").css("margin-top", f + "px")
			} g()
		} function g() {
			a("#jquery_simpleslide .simpleslide_slide").css("z-index", "3"); a(e[c]).show(); a(e[c]).css("z-index", "10"); a.fn.simpleslide.setTitle(a(e[c]).attr("title"));
			k()
		} function k() { setInterval("$.fn.simpleslide.animateSlide()", b.timePerSlide) } $this = a(this); d = a.extend({}, a.fn.simpleslide.defaults, d); h()
	}; a.fn.simpleslide.setTitle = function(d) { b.labels == true && a("#jquery_simpleslide .simpleslide_title_copy").text(d) }; a.fn.simpleslide.animateSlide = function() {
		var d = { opacity: "0", "z-index": "10", display: "block" }, h = { opacity: "1", "z-index": "3", display: "block" }; c = c < i ? (c += 1) : 0; var g = a(e[c]); a.fn.simpleslide.setTitle(a(e[c]).attr("title")); if (c == 0) {
			a("#jquery_simpleslide .simpleslide_slide").css(h);
			a(g).css(d).animate({ opacity: 1 }, b.transitionTime, b.transitionType)
		} else a(g).css(d).animate({ opacity: 1 }, b.transitionTime, b.transitionType, function() { a("#jquery_simpleslide .simpleslide_slide").css("z-index", "3"); a(g).css("z-index", "10") })
	}; a.fn.simpleslide.defaults = { startingSlide: 0, frameWidth: 425, frameHeight: 310, titlebarHeight: 20, labels: true, labelPosition: "bottom", timePerSlide: 5E3, transitionTime: 500, transitionType: "swing"}
})(jQuery);