/******************************************************************************* FILE: mud_Scripts.php REQUIRES: mud_API.js AUTHOR: Takashi Okamoto mud(tm) - http://www.mudcorp.com/ VERSION: 2.0 DATE: 01/14/2006 -------------------------------------------------------------------------------- This file is part of the MudCorp Website. The MudCorp Website itself is NOT free software; however there are many components that are free. Please consult the header comments for those files for the terms. For any licensing terms, please contact us by using the contact form at http://mudcorporation.com/ -------------------------------------------------------------------------------- *******************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // GLOBAL VARS var delay = 5; // autoplay delay var imgsGallery = new Array(); var proj, index, proj_list; var selected = 0; function sendFilter(loc) { location.href = "/projects/" + loc + "/"; return false; } function setSelected(newSelected) { // unset old $('p'+selected).className = "proj_elem"; $('p'+newSelected).className = "proj_selected"; selected = newSelected; } //////////////////////////////////////////////////////////////////////////////// // MOUSE EVENTS function setOnMouseClick() { var elements = document.getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { switch(elements[i].className) { case "contactForm": elements[i].onclick = function() { $("contact").style.display = "block"; return false; } break; case "next": elements[i].onclick = function() { var s = proj.nextImg(); setSelected(s); if (!index.hidden) { index.slideStart(); } return false; } break; case "prev": elements[i].onclick = function() { var s = proj.prevImg(); setSelected(s); if (!index.hidden) { index.slideStart(); } return false; } break; case "index": elements[i].onclick = function() { index.slideStart(); return false; } break; case "close": elements[i].onclick = function() { index.slideStart(); return false; } break; case "proj_elem": elements[i].onclick = function(evt) { evt = (evt) ? evt : ((window.event) ? event : null); if (evt) { var target = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if (target.nodeType == 3) target = target.parentNode; var imgNumber = parseInt(target.id.substring(1)); var s = proj.showImg(imgNumber); setSelected(s); } index.slideStart(); return false; } break; case "proj_selected": elements[i].onclick = function(evt) { evt = (evt) ? evt : ((window.event) ? event : null); if (evt) { var target = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if (target.nodeType == 3) target = target.parentNode; var imgNumber = parseInt(target.id.substring(1)); var s = proj.showImg(imgNumber); setSelected(s); } index.slideStart(); return false; } break; case "ap_start": elements[i].onclick = function() { proj.apStart(delay); return false; } break; case "ap_stop": elements[i].onclick = function() { proj.apStop(); return false; } break; } } } //////////////////////////////////////////////////////////////////////////////// // INIT function initGallery() { // load images imgsGallery[0] = new Object(); imgsGallery[0].title = "Fingers — The Politician (2005)"; imgsGallery[0].image = "/images/the_politician.gif"; imgsGallery[0].caption = '17\"x22\" UV coated giclée print on watercolour paper. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[1] = new Object(); imgsGallery[1].title = "Fingers — The Peace (2005)"; imgsGallery[1].image = "/images/the_peace.gif"; imgsGallery[1].caption = '17\"x22\" UV coated giclée print on watercolour paper. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[2] = new Object(); imgsGallery[2].title = "Fingers — The Number One (2005)"; imgsGallery[2].image = "/images/the_number_one.gif"; imgsGallery[2].caption = '17\"x22\" UV coated giclée print on watercolour paper. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[3] = new Object(); imgsGallery[3].title = "Fingers — The Mud (2005)"; imgsGallery[3].image = "/images/the_mud.gif"; imgsGallery[3].caption = '17\"x22\" UV coated giclée print on watercolour paper. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[4] = new Object(); imgsGallery[4].title = "Fingers — The Fuck You (2005)"; imgsGallery[4].image = "/images/the_fuck_you.gif"; imgsGallery[4].caption = '17\"x22\" UV coated giclée print on watercolour paper. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[5] = new Object(); imgsGallery[5].title = "Fingers — The Devil (2005)"; imgsGallery[5].image = "/images/the_devil.gif"; imgsGallery[5].caption = '17\"x22\" UV coated giclée print on watercolour paper. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[6] = new Object(); imgsGallery[6].title = "Miss Oak, USA — Air Force One (2005)"; imgsGallery[6].image = "/images/airforceone.jpg"; imgsGallery[6].caption = '18\"x24\" UV coated giclée print on canvas. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[7] = new Object(); imgsGallery[7].title = "Miss Oak, USA — Oscar (2005)"; imgsGallery[7].image = "/images/oscar.jpg"; imgsGallery[7].caption = '18\"x24\" UV coated giclée print on canvas. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[8] = new Object(); imgsGallery[8].title = "Miss Oak, USA — UFO (2005)"; imgsGallery[8].image = "/images/ufo.jpg"; imgsGallery[8].caption = '18\"x24\" UV coated giclée print on canvas. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[9] = new Object(); imgsGallery[9].title = "Miss Oak, USA — Cowboy (2005)"; imgsGallery[9].image = "/images/cowboy.jpg"; imgsGallery[9].caption = '18\"x24\" UV coated giclée print on canvas. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[10] = new Object(); imgsGallery[10].title = "Miss Oak, USA — Eagle (2005)"; imgsGallery[10].image = "/images/eagle.jpg"; imgsGallery[10].caption = '18\"x24\" UV coated giclée print on canvas. Edition of 1. Exhibited for Constructing Victims with Alejandro Vidal at p|m gallery in Toronto, Canada.'; imgsGallery[11] = new Object(); imgsGallery[11].title = "Camaoflage (2004)"; imgsGallery[11].image = "/images/camao.jpg"; imgsGallery[11].caption = 'Camouflage made of little Maos. 34\"x34\" digital print on paper. Comes in four colors.'; imgsGallery[12] = new Object(); imgsGallery[12].title = "Ben Rubin — Untitled (2004)"; imgsGallery[12].image = "/images/benrubin.jpg"; imgsGallery[12].caption = 'Technology: Processing, Perl, After Effects, LCD light boxes and controller.
Programming for Ben Rubin’s Untitled work. More info here on his website.
http://earstudio.com/projects/signlang.html'; imgsGallery[13] = new Object(); imgsGallery[13].title = "Mudtallica (2003)"; imgsGallery[13].image = "/images/mudtallica.jpg"; imgsGallery[13].caption = 'Logotype. Protest against corporate crap rock.'; imgsGallery[14] = new Object(); imgsGallery[14].title = "Byebye (2001)"; imgsGallery[14].image = "/images/byebye.jpg"; imgsGallery[14].caption = 'Digital print on canvas.'; imgsGallery[15] = new Object(); imgsGallery[15].title = "Welcome (2001)"; imgsGallery[15].image = "/images/welcome.jpg"; imgsGallery[15].caption = 'Digital print on canvas.'; imgsGallery[16] = new Object(); imgsGallery[16].title = "Quaker (2001)"; imgsGallery[16].image = "/images/quaker.jpg"; imgsGallery[16].caption = '33\"x46\" UV coated giclée print on canvas. Edition of 1.'; imgsGallery[17] = new Object(); imgsGallery[17].title = "Bon (2001)"; imgsGallery[17].image = "/images/bon.jpg"; imgsGallery[17].caption = '33\"x46\" UV coated giclée print on canvas. Edition of 1.'; proj = new MudFadeGallery('proj', 'proj', imgsGallery, {startNum: 0, preload: true}); // set initial values var title = (imgsGallery[0].title) ? imgsGallery[0].title : "No Title"; var caption = (imgsGallery[0].caption) ? imgsGallery[0].caption : "No caption"; $("proj_title").innerHTML = title; $("proj").src = imgsGallery[0].image; $("proj_caption").innerHTML = caption; $("proj_number").innerHTML = "1 of " + imgsGallery.length + " projects"; } function initIndex() { proj_list = ""; for (var i = 0; i < imgsGallery.length; i++) { var p_name = imgsGallery[i].title if (p_name.length > 64) p_name = p_name.substring(0, 64) + "..."; if (i == 0) proj_list += '' + (i+1) + '. ' + p_name + '
'; else proj_list += '' + (i+1) + '. ' + p_name + '
'; } proj_list += 'close'; $("index").innerHTML = proj_list; //MudPopContent(id, showX, showY, hideX, hideY, width, height) var index_dimensions = Element.getDimensions('index'); index = new MudPopContent('index', 0, 0, 0, -index_dimensions.height, index_dimensions.width, index_dimensions.height); $('index').style.top = -index_dimensions.height + "px"; } function setIndexSize() { if (/MSIE/.test(navigator.userAgent) && !/Mac/.test(navigator.userAgent)) { var h = (document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight; $('index-wrapper').style.height = h + "px"; } else { var h = Element.getHeight('index'); $('index-wrapper').style.height = h + "px" } } function init() { initGallery(); initIndex(); setIndexSize(); setOnMouseClick(); } //////////////////////////////////////////////////////////////////////////////// // EVENTS Event.observe(window, 'load', init, false);