/*!
	Site:		Rollerstrut: Superfunk Roller Disco
	File:		/assets/scripts/plugins.js
	Author:		Andrew Disley, Simplified http://simplified.co.uk/
	Version:	2010-09-18
----------------------------------------------- */
(function(b){var c=true;b.fn.extend({accessibleCarousel:function(d){var e=this;a("accessibleNavigation");e.items=[];e.positions=[];e.remoteItems=[];e.timeout=null;e.currentItemIndex=0;e.options=b.extend({itemElement:"li",remote:null,autoRotate:false,rotateWaitTime:3000,startIndex:0,updateElementLink:null,updateElementText:null,animation:"slide"},d);e.setup=function(g){e.items=g.find(e.options.itemElement);var f=0;e.items.each(function(h){e.positions[h]=f;f+=e.items.outerWidth("includeMargin");a(f)});e.showItem(e.options.startIndex,g,true);if(e.options.remote){e.setupRemote(g)}if(e.options.autoRotate){e.autoRotateWait(g)}e.updateRemote(e.currentItemIndex)};e.setupRemote=function(f){a("setupRemote");e.remoteItems=b(e.options.remote).find("li");e.remoteItems.find("a").each(function(h,i){a(h);a(i);b(i).bind("click",function(j){e.stopAutoRotate();e.showItem(h,f);j.preventDefault()});var g=b(e.items[h]).find("a").attr("href");if(g){b(i).attr("href",g)}})};e.updateRemote=function(f){a("updateRemote");a(f);b(e.remoteItems).removeClass("active");b(e.remoteItems[f]).addClass("active")};e.showItem=function(h,i,g){a("showItem");a(h);var k=e.currentItemIndex;e.currentItemIndex=h;var f="-"+e.positions[h]+"px";a(f);if(e.options.remote){e.updateRemote(h)}if(e.options.updateElementLink){b(e.options.updateElementLink).removeClass("link").unbind("click");if(b(e.items[h]).find("a").attr("href")){b(e.options.updateElementLink).click(function(l){document.location.href=b(e.items[h]).find("a").attr("href")}).addClass("link")}}if(e.options.updateElementText){var j="";a("test");a(b(e.items[h]).find("img[title]").length);if(b(e.items[h]).find("img[title]").length){j=b(e.items[h]).find("img").attr("title");a(j)}else{j=e.items[h].text();a(j)}b(e.options.updateElementText).html(j);a(b(e.options.updateElementText))}switch(e.options.animation){case"blend":if(g){b(e.items).hide();b(e.items[h]).show();return}b(e.items[k]).fadeOut("slow");b(e.items[h]).fadeIn("slow");break;case"slide":default:if(g){b(i).css("margin-left",f);return}b(i).stop().animate({marginLeft:f},"fast")}};e.showNextItem=function(g){a("showNextItem");var f=e.currentItemIndex+1;if(f>=e.items.length){f=0}e.showItem(f,g)};e.autoRotateWait=function(f){a("autoRotateWait");e.timeout=window.setTimeout(function(){e.showNextItem(f);e.autoRotateWait(f)},e.options.rotateWaitTime)};e.stopAutoRotate=function(){a("stopAutoRotate");if(e.timeout){window.clearTimeout(e.timeout);e.timeout=null}};return e.each(function(){var f=b(this);e.setup(f)})}});function a(d){if(c&&window.console&&window.console.log){window.console.log(d)}}})(jQuery);/*!
	Site:		Rollerstrut: Superfunk Roller Disco
	File:		/assets/scripts/global.js
	Author:		Andrew Disley, Simplified http://simplified.co.uk/
	Version:	2010-09-18
----------------------------------------------- */
var $j=jQuery;var isIE=false;var isIE6=false;var isSafari=false;var SGlobal={jEOHTML:null,utilBrowserTests:function(){if($j.browser.msie){isIE=true}if(typeof document.body.style.maxHeight=="undefined"){isIE6=true;try{document.execCommand("BackgroundImageCache",false,true)}catch(a){}}if($j.browser.safari){isSafari=true;$j("div#Container").addClass("safari")}},init:function(){var a=this;a.jEOHTML=$j("html");a.jEOHTML.addClass("jQ");a.utilBrowserTests()}};$j(function(){SGlobal.init();if($j("figure.carousel .items").length){$j("figure.carousel .items").accessibleCarousel({itemElement:"img",autoRotate:true})}$j("#kuujku-kuujku").val("Your email address").one("focus",function(){$j(this).val("")})});
