(function(a){})(this.jQuery);$.fn.fastResize=function(a){$(this).bind("fastResize",a)};(function(b){var c={};var a={init:function(d){return this.each(function(){var g=b(this).find("section");var f=b(this);var e=[];g.each(function(){e.push(b(this).attr("id"))});b(this).data("pageController",{sections:e,currentId:""});b(window).scroll(function(h){a._scrollHandler.apply(f,[])})})},_scrollHandler:function(){var f=b(document).scrollTop();var e=f+b(window).height();var m=b(this).data("pageController").sections;var j=b(this).data("pageController").currentId;var h;var g=m.length;var k;var n;var d;id_for:for(h=0;h<g;++h){if(h==g-2&&g>2){d=m[g-1]}else{if(h==g-1&&g>2){d=m[g-2]}else{d=m[h]}}k=b("#"+d).offset().top;k=(h?k:0);n=b("#"+d).outerHeight();if(h!=g-2){if(f>=0&&f<=k+n){break id_for}}else{if(f>=k+n||Math.abs(e-(k+n))<1){break id_for}}}if(j!=d){b(this).data("pageController").currentId=d;b(this).trigger("focusChange",[d])}},currentId:function(){return b(this).data("pageController").currentId},getSections:function(){},showSection:function(e,d){return this.each(function(){var f=b(this).data("pageController");var h=f.sections;var g;if(h[0].id==e){g=0}else{g=b("#"+e).offset().top}if(d===true){b(window.opera?"html":"html, body").scrollTop(g+2)}else{b(window.opera?"html":"html, body").animate({scrollTop:g+2},"slow")}})}};b.fn.pageController=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.pageController")}}}})(this.jQuery);(function(c){var a='<div class="quote-box">		<div class="wrapper">			<strong></strong>			<p></p>			<em></em>		</div>	</div>';var d={title:"Pearls of wisdom",content:"C is for cookie.",author:"Cookie monster"};var b={init:function(e){return this.each(function(){var f=c(this);e=c.extend({},d,e);c(this).find("strong").text(e.title);c(this).find("p").text(e.content);c(this).find("em").text(e.author);c(this).click(function(){f.stop().clearQueue();b.animateOut.apply(f)});c(this).data("quoteBox",{options:e});b._resizeHandler.apply(f);c(window).fastResize(function(){b._resizeHandler.apply(f)});c(this).css({opacity:0});c(this).delay(1000).animate({opacity:1},"slow").delay(9000).animate({opacity:0},200).queue(function(){b.destroy.apply(f)})})},_resizeHandler:function(){return this.each(function(){var f=c(this);var g=c(this).find(".wrapper");var e;f.width(Settings.columnWidth*2);f.css("left",Settings.columnWidth*(Settings.columns==4?1:2));f.css("top",Settings.gridItemHeight);e=Math.ceil(g.height()/Settings.gridItemHeight);f.height(e*Settings.gridItemHeight)})},destroy:function(){return this.each(function(){c(this).remove()})},animateOut:function(){return this.each(function(){var e=c(this);e.fadeOut("slow").queue(function(){e.quoteBox("destroy")})})},createBox:function(g,e){var f=c(a);f.attr("id",g);c(this).prepend(f);f.quoteBox(e);return f}};c.fn.quoteBox=function(e){if(b[e]){return b[e].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof e==="object"||!e){return b.init.apply(this,arguments)}else{c.error("Method "+e+" does not exist on jQuery.quoteBox")}}}})(this.jQuery);(function(b){var c={};var a={init:function(d){return this.each(function(){var f=this;var e=b(this).find("nav li");e.each(function(g){b(this).find("a").click(function(){a._clickHandler.apply(f,[g]);return false})});b(window).resize(function(){a._resizeHandler.apply(f)});b(this).data("leftColumn",{links:e})})},showSection:function(d){return this.each(function(){var g=b(this).data("leftColumn");var e=g.links;var f;e.removeClass("selected");f=e.parent().find('li[class="'+d+'"]');f.addClass("selected");Cufon.refresh("header nav ul li a");var h=(300-Settings.columnWidth)+5;b("header nav ul li.selected").css("background-position","-"+h+"px 8px")})},_clickHandler:function(d){return b(this).each(function(){var h=b(this).data("leftColumn");var e=h.links;var g=b(e[d]);var f=g.attr("class");var i;i=b.trim(f.split("selected").join(""));
b(this).trigger("menuClick",[i])})},_resizeHandler:function(){return b(this).each(function(){b(this).width(Settings.columnWidth);b(this).height("100%");var d=(300-Settings.columnWidth)+5;b("header nav ul li.selected").css("background-position","-"+d+"px 8px")})}};b.fn.leftColumn=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.leftColumn")}}}})(this.jQuery);(function(b){var c={columnMinWidth:400,gridItemHeight:140,minHeight:200,touch:false};var a={init:function(d){return this.each(function(){d=b.extend({},c,d);var f=this;var e=b(this).find(".item");e.gridItem({touch:d.touch});b(window).fastResize(function(){a._resizeHandler.apply(f)});b(this).data("workGrid",{items:e,options:d})})},_resizeHandler:function(){var n=b(this).parent().width();var j=b(this);var q=b(this).data("workGrid").items;var e=b(this).data("workGrid").options;var u;b(this).width(n);var d=Math.floor(n/e.columnMinWidth);var f=Math.floor(n/d);var t=Math.ceil(q.length/d)*d;var g;var v=(t/d);var m=v*e.gridItemHeight;var s=0;var p=Math.max(b(window).height(),e.minHeight);var o=n-(f*d);if(m<p){var l=Math.ceil(p/e.gridItemHeight);var t=(l*d)}var k=b(this).find(".item");var h=t-k.length;var r=0;if(h>0){r=(k.length-Math.floor(k.length/q.length)*q.length);for(s=0;s<h;s++){g=b(q[(r++)%q.length]).clone().appendTo(b(this));g.gridItem({touch:e.touch})}Cufon.refresh(".item div.description p")}else{if(h<0){s=Math.abs(h);while(s--){g=b(k[k.length-1]);g.gridItem("destroy");g.remove()}}}if(h!=0){k=b(this).find(".item")}k.each(function(i){b(this).width(f+((i%d)?o:0));b(this).height(e.gridItemHeight);b(this).css("left",((i%d)*f)+"px");b(this).css("top",(Math.floor(i/d)*e.gridItemHeight)+"px");b(this).unbind("click");b(this).click(function(){var w=b(this).gridItem("getId");j.trigger("gridClick",w)});b(this).gridItem("resize")});u=(Math.ceil(k.length/d))*e.gridItemHeight;b(this).height(u);b(this).parent().height(u)}};b.fn.workGrid=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.workGrid")}}}})(this.jQuery);(function(c){var d={touch:true};var a=/item-([0-9]{1,})/g;var b={init:function(e){return this.each(function(){var g=c(this);var f=c(this).find("div.thumbnail img");e=c.extend({},d,e);if(!e.touch){f.load(function(){b._resizeHandler.apply(f.parent())});b._resizeHandler.apply(f.parent());c(this).hover(function(){b._mouseoverHandler.apply(c(this))},function(){b._mouseoutHandler.apply(c(this))})}else{f.load(function(){b._staticResizeHandler.apply(f.parent())});b._staticResizeHandler.apply(f.parent())}c(this).click(function(){c(this).trigger("gridClick",[id])});g.data("gridItem",{options:e})})},destroy:function(){return this.each(function(){var e=c(this).find("div.thumbnail img");c(this).removeData("gridItem");c(this).unbind("mouseenter mouseleave");e.unbind("load")})},_resizeHandler:function(){return c(this).each(function(){var i=c(this);var e=c(this).find("div.thumbnail img");var g=c(this).find("div.description");var j=g.find("p.title");var f=g.find("p.description");g.width(i.width());g.height(i.height());g.css("top",i.height());ImageUtil.resize(e,i.width(),i.height());var h=i.height()-f.height()-10;f.css("top",h);j.css("top",h-j.height());f.css("left",10);j.css("left",10)})},_staticResizeHandler:function(){return c(this).each(function(){var i=c(this);var f=c(this).find("div.thumbnail img");var e=c(this).find("div.thumbnail");var h=c(this).find("div.description");var j=h.find("p.title");var g=h.find("p.description");e.css("opacity",1);h.css("opacity",0.8);h.width(i.width());ImageUtil.resize(f,i.width(),i.height());j.css("top",10);g.css("top",10+j.height());h.height(10*2+j.height()+g.height());g.css("left",10);j.css("left",10);h.css("top",i.height()-h.height())})},_mouseoverHandler:function(){return c(this).each(function(){var e=c(this).find("div.thumbnail");
var f=c(this).find("div.description");f.animate({top:0},200);e.animate({top:-c(this).height()},200)})},_mouseoutHandler:function(){return c(this).each(function(){var e=c(this).find("div.thumbnail");var f=c(this).find("div.description");f.animate({top:c(this).height()},200);e.animate({top:0},200)})},getId:function(){var f=c(this).attr("class");var g=-1;var e;while(e=a.exec(f)){g=(Number(e[1]))}return g},resize:function(){var e=c(this).data("gridItem").options;if(!e.touch){b._resizeHandler.apply(c(this))}else{b._staticResizeHandler.apply(c(this))}}};c.fn.gridItem=function(e){if(b[e]){return b[e].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof e==="object"||!e){return b.init.apply(this,arguments)}else{c.error("Method "+e+" does not exist on jQuery.gridItem")}}}})(this.jQuery);(function(b){var c={};var a={init:function(d){return this.each(function(){var f=b(this).find("p.center");var g=b(this);var e;var h;b(this).append('<a href="#" class="top"><span>Top</span></a><a href="#" class="bottom"><span>Bottom</span></a>');e=b(this).find("a.top:first");h=b(this).find("a.bottom:first");e.click(function(){g.trigger("prevClick",[g.attr("id"),g.position()]);return false});h.click(function(){g.trigger("nextClick",[g.attr("id"),g.position()]);return false});b(this).data("centerTextPage",{textField:f});b(window).fastResize(function(){a._resizeHandler.apply(g)})})},_resizeHandler:function(){var j=b(this).width();var e=b(this).height();var i=Math.floor(j*0.8);var h=null;var g=(j-i)*0.5;var f=null;var d=b(this).find("a.top:first");var k=b(this).find("a.bottom:first");textField=b(this).data("centerTextPage").textField;d.css("left",(j-d.width())*0.5);k.css("left",(j-d.width())*0.5);d.css("top",20);k.css("top",e-k.height()-20);textField.width(i);textField.css("left",g+"px");h=textField.height();f=(e-h)*0.5;textField.css("top",f+"px")}};b.fn.centerTextPage=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.centerTextPage")}}}})(this.jQuery);(function(b){var c={};var a={init:function(d){return this.each(function(){var f=b(this);var e;var g;b(this).append('<a href="#" class="top top-white"><span>Top</span></a><a href="#" class="bottom bottom-white"><span>Bottom</span></a>');e=b(this).find("a.top:first");g=b(this).find("a.bottom:first");e.click(function(){f.trigger("prevClick",[f.attr("id"),f.position()]);return false});g.click(function(){f.trigger("nextClick",[f.attr("id"),f.position()]);return false});b(window).fastResize(function(){a._resizeHandler.apply(f)})})},_resizeHandler:function(){var r=b(this).width();var p=b(this).height();var B=Math.floor(r*0.8);var q=b(this).find(".cube p");var s=b(q[0]).height();var e;var m=[];var k=0;var z=0;var g=0;var C=false;var y=10;var v=20;var f=b(this).find("a.top:first");var d=b(this).find("a.bottom:first");f.css("left",(r-f.width())*0.5);d.css("left",(r-f.width())*0.5);f.css("top",20);d.css("top",p-d.height()-20);q.each(function(i,j){if(!i){e=[]}e.push(j);k+=b(j).width();if(i==q.length-1){C=true}else{if((k+b(q[i+1]).width())>B-(e.length*v)){C=true}}if(C){m.push({items:e,width:k});e=[];k=0;C=false}});var w;var t=m.length;var u;var n;var o;var A;var h=(b(this).width()-B)*0.5;var x=(b(this).height()-(t)*(s+y))*0.5;for(w=0;w<t;w++){e=m[w];n=e.items.length;A=B-e.width;if(n){z=(A)/(n-1)}else{z=0}left=0;o=Math.round(x+((w)*(s+y)));if(A>B*0.3&&w==t-1){z=v}for(u=0;u<n;u++){columnItem=b(e.items[u]);columnItem.css("top",o+"px");columnItem.css("left",Math.round(h+(left+(z*u)))+"px");left+=columnItem.width()}}}};b.fn.cubeTextPage=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.cubeTextPage")}}}})(this.jQuery);(function(b){var c={};var a={init:function(d){return this.each(function(){var f=b(this).find("div.list");
var g=b(this);var e;var h;b(this).append('<a href="#" class="top top-dark"><span>Top</span></a><a href="#" class="bottom bottom-dark"><span>Bottom</span></a>');e=b(this).find("a.top:first");h=b(this).find("a.bottom:first");e.click(function(){g.trigger("prevClick",[g.attr("id"),g.position()]);return false});h.click(function(){g.trigger("nextClick",[g.attr("id"),g.position()]);return false});b(this).data("textListPage",{list:f});b(window).fastResize(function(){a._resizeHandler.apply(g)})})},_resizeHandler:function(){var i=b(this).data("textListPage").list;var h=b(this).width();var e=b(this).height();var k=b(i).width();var g=(h-k)*0.5;var f=null;var d=b(this).find("a.top:first");var j=b(this).find("a.bottom:first");d.css("left",(h-d.width())*0.5);j.css("left",(h-d.width())*0.5);d.css("top",20);j.css("top",e-j.height()-20);i.css("margin-left",g+"px")}};b.fn.textListPage=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.textListPage")}}}})(this.jQuery);(function(b){var c={minWidth:738};var a={init:function(d){return this.each(function(){var g=b(this);var f=b(this).find(".column");var e;var h;b(this).append('<a href="#" class="top top-white"><span>Top</span></a><a href="#" class="bottom bottom-white"><span>Bottom</span></a>');e=b(this).find("a.top:first");h=b(this).find("a.bottom:first");e.click(function(){g.trigger("prevClick",[g.attr("id"),g.position()]);return false});h.click(function(){g.trigger("nextClick",[g.attr("id"),g.position()]);return false});b(f.get(0)).addClass("first");d=b.extend({},c,d);b(this).data("columnTextPage",{options:d,columns:f});b(window).fastResize(function(){a._resizeHandler.apply(g)})})},_resizeHandler:function(){return this.each(function(){var m=b(this);var f=b(this).width();var o=b(this).height();var l=b(this).data("columnTextPage");var p=l.options;var j=l.columns;var e=p.minWidth;var h=e/j.length;var n=400;var i=(f-e)*0.5;var g;var k=b(this).find("a.top:first");var d=b(this).find("a.bottom:first");k.css("left",(f-k.width())*0.5);d.css("left",(f-k.width())*0.5);k.css("top",20);d.css("top",o-d.height()-20);b(j).each(function(){n=Math.max(n,b(this).height())});g=(o-n)*0.5;b(j).each(function(q,r){b(this).css("left",i+(b(this).outerWidth()*q));b(this).css("top",g);b(this).width(h-(10*2));b(this).height(n)})})}};b.fn.columnTextPage=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.columnTextPage")}}}})(this.jQuery);(function(b){var c={};var a={init:function(d){return this.each(function(){var r=b(this);var s=b(this).find(".map");var m=new google.maps.LatLng(59.32189295612079,18.06753158569336);var k=[{title:"Bishops Arms",position:[59.31988119943005,18.064844012260437],id:"beer"},{title:"Järnet",position:[59.32302331953806,18.073378801345825],id:"beer"},{title:"Cafe Mineur",position:[59.323856,18.0697277],id:"food"},{title:"Babylon",position:[59.3150947,18.0749653],id:"food"},{title:"Skivhögen",position:[59.316801,18.0738307],id:"shop"},{title:"Konst-ig",position:[59.3131341,18.0764224],id:"shop"},{title:"Café Mazzarini",position:[59.32221044697875,18.07223081588745],id:"coffee"},{title:"Webbhallen",position:[59.3374014,18.0614321],id:"shop"},{title:"Fotografiska",position:[59.3190526,18.077127],id:"eye"},{title:"Liljevalchs",position:[59.3257661,18.0960918],id:"eye"},{title:"Mickes CD/Vinyl",position:[59.3174122,18.0326292],id:"shop"},{title:"Matkultur",position:[59.314083,18.0903614],id:"food"},{title:"Man In The Moon",position:[59.33996331809542,18.06474208831787],id:"beer"},{title:"Stadsbiblioteket",position:[59.34333334568123,18.05477499961853],id:"book"},{title:"Lao Wai",position:[59.3421551,18.0589959],id:"food"},{title:"Alfa Antikvariat",position:[59.3357019,18.0594285],id:"shop"},{title:"Debaser",position:[59.34076755960165,18.073561191558838],id:"beer"},{title:"Hyper Island",position:[59.2985247,17.9915315],id:"book"},{title:"Forsbergs",position:[59.3193364,18.0474998],id:"book"},{title:"New York Bar",position:[35.6894875,139.6917064],id:"beer"},{title:"Black Bo's",position:[55.9456793428431,-3.181164264678955],id:"food"},{title:"The Good Mixer",position:[51.5393118,-0.1446272],id:"beer"},{title:"Rough Trade",position:[51.5215206,-0.073384],id:"shop"},{title:"La Marine Nationale",position:[43.115019195614124,5.888671875],id:""},{title:"Breda University",position:[51.5837987,4.7969819],id:"book"},{title:"Café Central",position:[48.210196,16.365431],id:"coffee"},{title:"Cafe Cantona",position:[51.33306175684533,12.377514839172363],id:"beer"},{title:"Brooklyn Brewery",position:[40.721535,-73.95745],id:"beer"},{title:"Hotell Arkipelag",position:[60.0979954,19.9441389],id:""},{title:"Aqua Spirit",position:[22.29604,114.169821],id:"beer"},{title:"Light Restaurant",position:[22.3055184,114.1718533],id:"food"},{title:"Birth Office",position:[59.3250589,18.0668361],id:"office"}];
var g=[{featureType:"administrative",elementType:"all",stylers:[{saturation:40},{hue:"#331509"}]},{featureType:"landscape",elementType:"all",stylers:[{hue:"#331509"},{saturation:40},{lightness:0}]},{featureType:"poi",elementType:"all",stylers:[{hue:"#331509"},{saturation:40}]},{featureType:"road",elementType:"all",stylers:[{hue:"#FF4200"},{saturation:60}]},{featureType:"transit",elementType:"all",stylers:[{hue:"#331509"},{saturation:40}]}];var f;var t={zoom:15,center:m,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:false,panControl:false,streetViewControl:false,mapTypeControl:false};var q={map:f,name:"Map"};var j=new google.maps.StyledMapType(g,q);var p;var h=k.length;var o;var n;var e;f=new google.maps.Map(s[0],t);f.mapTypes.set("colouredMap",j);f.setMapTypeId("colouredMap");var o=new google.maps.Marker({position:new google.maps.LatLng(0,0),map:f,title:"_",visible:false});for(p=0;p<h;p++){o=new RichMarker({position:new google.maps.LatLng(k[p].position[0],k[p].position[1]),map:f,draggable:false,flat:true,content:'<div class="marker'+(k[p].id!="office"?" regular":"")+'"><a>'+k[p].title+'</a><p class="'+k[p].id+'"><span>'+k[p].id+"</span></p><div>"})}b(this).prepend('<a href="#" class="top"><span>Top</span></a><a href="#" class="bottom"><span>Bottom</span></a>');n=b(this).find("a.top:first");e=b(this).find("a.bottom:first");e.hide();n.click(function(){r.trigger("prevClick",[r.attr("id"),r.position()]);return false});e.click(function(){r.trigger("nextClick",[r.attr("id"),r.position()]);return false});b(this).data("placesPage",{map:f});b(window).fastResize(function(){a._resizeHandler.apply(r)});a._resizeHandler.apply(r)})},_resizeHandler:function(){this.each(function(){var f=b(this).width();var e=b(this).height();var d=b(this).find("a.top:first");var g=b(this).find("a.bottom:first");d.css("left",(f-d.width())*0.5);g.css("left",(f-d.width())*0.5);d.css("top",20);g.css("top",e-g.height()-20)})}};b.fn.placesPage=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof d==="object"||!d){return a.init.apply(this,arguments)}else{b.error("Method "+d+" does not exist on jQuery.placesPage")}}}})(this.jQuery);(function(c){var d={width:820,imageWidth:820,imageHeight:480,jsonPath:"http://birth.se/2011/wp-content/themes/birth2011/json/project.php"};var b='<div class="content">					<a href="#" class="close"><span>Close</span></a>					<div class="image-counter"></div>					<div class="image-slider"></div>					<div class="title"></div>					<div class="info"></div>					<div class="description"></div>			</div>						<div class="background"></div>';var a={init:function(e){this.each(function(){if(c(this).data("detailBox")!=undefined){return}var i=c(this);var h;var f;var g;c(this).html(b);h=c(this).find(".image-slider:first");f=c(this).find("a.close");f.click(function(){i.trigger("close");return false});g=c(this).find(".background:first");g.click(function(){i.trigger("close");return false});e=c.extend({},d,e);h.width(e.imageWidth);h.height(e.imageHeight);i.width(e.width);a._fastResizeHandler=function(){a._resizeHandler.apply(i)};c(window).fastResize(a._fastResizeHandler);a.toggle.apply(c(this),[false]);c(this).data("detailBox",{options:e})})},_fastResizeHandler:function(){},remove:function(){this.each(function(){var e;var f;c(window).unbind("fastResize",a._fastResizeHandler);e=c(this).find("a.close:first");f=c(this).find(".image-slider:first");f.contentSlider("remove");e.unbind("click");c(this).remove()})},_closeHandler:function(){this.each(function(){a.remove.apply(c(this))})},_resizeHandler:function(j){var h=c(window).width();var i=c(this).find(".content");var g=c(this).data("detailBox").options;var e=g.width;var k=(h-e)*0.5;var f=c(this).find(".close");i.width(g.width);i.css("left",k);f.css("left",e-f.width())},load:function(e){this.each(function(){var f=c(this).data("detailBox").options;var h=c(this);var g=c(this).find(".image-slider");g.contentSlider();c.getJSON(f.jsonPath+"?id="+e,function(i){a.show.apply(h,[i])
})})},show:function(e){this.each(function(){var h;var f=c(this).data("detailBox").options;var g;a.toggle.apply(c(this),[true]);c(this).find(".title").html(e.title).width(f.width);c(this).find(".info").html(e.info).width(f.width);c(this).find(".description").html(e.description).width(f.width);if(e.description=="<p></p>"){c(this).find(".description").hide()}g=c(this).find(".image-counter");Cufon.refresh(".detail-box .content .title");Cufon.refresh(".detail-box .content .info");a._resizeHandler.apply(c(this));h=c(this).find(".image-slider");h.bind("indexChange",function(j,k,i){log(k+"/"+i);g.text("Sample "+(k+1)+"/"+i)});h.contentSlider("display",e.items);h.contentSlider("show",0)})},toggle:function(e){this.each(function(){log(e);if(e){c(this).find(".content").show()}else{c(this).find(".content").hide()}})},createBox:function(g,e){var f=c('<div class="detail-box"></div>');f.attr("id",g);c(this).prepend(f);c(f).detailBox(e);return f}};c.fn.detailBox=function(e){if(a[e]){return a[e].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof e==="object"||!e){return a.init.apply(this,arguments)}else{c.error("Method "+e+" does not exist on jQuery.detailBox")}}}})(this.jQuery);(function(c){var d={};var b='<a href="#" class="left"><span>Left</span></a><a href="#" class="right"><span>Right</span></a><div class="sequences"></div>';var a={init:function(e){this.each(function(){var g=c(b);var f;var h;var i=c(this);e=c.extend({},d,e);c(this).append(g);f=c(this).find("a.left");h=c(this).find("a.right");f.click(function(){a.showPrevious.apply(i);return false});h.click(function(){a.showNext.apply(i);return false});c(this).data("contentSlider",{options:e,currentPointer:-1,list:null})})},clear:function(){},remove:function(){this.each(function(){var e;var f;e=c(this).find("a.left:first");f=c(this).find("a.right:first");e.unbind("click");f.unbind("click")})},showPrevious:function(){this.each(function(){var f=c(this).data("contentSlider");var h=f.currentPointer;var e=f.list;var g;g=h-1;if(h==-1){a.show.apply(c(this),[0])}else{if(g<0){a.show.apply(c(this),[e.length-1])}else{a.show.apply(c(this),[g])}}})},showNext:function(){this.each(function(){var f=c(this).data("contentSlider");var h=f.currentPointer;var e=f.list;var g;g=h+1;if(h==-1){a.show.apply(c(this),[0])}else{if(g>e.length-1){a.show.apply(c(this),[0])}else{a.show.apply(c(this),[g])}}})},show:function(e){this.each(function(){var j=c(this).data("contentSlider");var i=j.currentPointer;var l=j.list;var m=c(this);var n=c(this).find(".sequences");var k=c(this).find(".sequence");var g=c(this).width();var f=c(this).height();var h;var h;var p;var o;m.trigger("indexChange",[e,l.length]);if(i!=-1){k.each(function(){c(this).remove()})}h=c('<div class="sequence"></div>');n.append(h);o=l[e];if(o.indexOf("vimeo.com")!=-1||o.indexOf("youtube.com")!=-1){h.addClass("video-player");p=c('<iframe src="'+o+'" width="'+g+'" height="'+m.height()+'" frameborder="0"></iframe>');h.append(p)}else{h.addClass("image");p=c('<img src="'+o+'" />');h.append(p)}h.css("opacity",0);h.animate({opacity:1},"slow");c(this).data("contentSlider").currentPointer=e})},display:function(e){this.each(function(){var i=c(this).data("contentSlider");var n=i.options;var m=c(this).find(".sequences");var k=c(this);var h=c(this).width();var g=c(this).height();var f=c(this).find("a.left");var l=c(this).find("a.right");var j;j=c(this).offset().top-c(this).parent().offset().top;m.width(h);m.height(c(this).height());f.css("left",-(f.width()+20));f.css("top",(j+((g-f.height())*0.5))+"px");l.css("left",h+20);l.css("top",(j+((g-f.height())*0.5))+"px");if(e.length>1){f.show();l.show()}else{f.hide();l.hide()}i.list=e})}};c.fn.contentSlider=function(e){if(a[e]){return a[e].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof e==="object"||!e){return a.init.apply(this,arguments)}else{c.error("Method "+e+" does not exist on jQuery.contentSlider")}}}})(this.jQuery);window.log=function(){log.history=log.history||[];log.history.push(arguments);
if(this.console){}};(function(b){var a=b.write;b.write=function(c){log("document.write(): ",arguments);if(/docwriteregexwhitelist/.test(c)){a.apply(b,arguments)}}})(document);
