﻿
/*
imagesQueue.js FULL SOURCE
A simple, cross-browser, *parallel* images loader object.
Check http://labs.lieldulev.com/imagesQueue/ for more details.
*/
imagesQ = {
    onComplete: function () { } // Fires when all finished loading
			, onLoaded: function () { } // Fires when an image finishes loading
			, current: null // Last loaded image (Image Object)
			, qLength: 0 // the queue length before process_queue
			, images: [] // Loaded images (array of Image Object)
			, inProcess: false // a flag to indicate if in process_queue
			, queue: [] // Waiting to be processed (array of strings (urls for Image SRC))
			, queue_images: function () { // gets multiple arguments each can be either an image src or an array of image src (you can mix).
			    var arg = arguments;
			    for (var i = 0; i < arg.length; i++) {
			        if (arg[i].constructor === Array) {
			            this.queue = this.queue.concat(arg[i]); // add to queue, do not empty it!
			        } else if (typeof arg[i] === 'string') {
			            this.queue.push(arg[i]);
			        }
			    }
			}
			, process_queue: function () { // start loading images from the queue
			    this.inProcess = true;
			    this.qLength += this.queue.length;
			    while (this.queue.length > 0) {
			        this.load_image(this.queue.shift()); //pull the next image off the top and load it
			    }
			    this.inProcess = false;
			}
			, load_image: function (imageSrc) { // load a single by a url and continue to process the queue
			    var th = this;
			    var im = new Image;
			    im.onload = function() { // After user agent has the image
			        th.current = im; // set the current
			        th.images.push(im); // add the image to the stack
			        (th.onLoaded)(); //fire the onloaded
			        if (th.queue.length > 0 && !th.inProcess) {
			            th.process_queue(); // make sure other items are loaded!
			        }
			        if (th.qLength == th.images.length) { // all images loaded?
			            (th.onComplete)(); // call callback
			        } //else{// if queue is not empty 
			        //	
			        // }
			    };
			    im.src = imageSrc; // Tell the User Agent to GET the image
			}
};
  

var addthis_config = {
    username: "kkemp"
};

var addthis_share =
{ title: "Nothing Against Life the film",
    url: "http://www.NothingAgainstLife.com",
    description: "This website is fully dedicated to promoting the making of the film NOTHING AGAINST LIFE."
};


$(document).ready(function () {
    $('.amail').amail('a@t', 'd.d');






    $("img.rollover").hover(function () {
        $(this).attr("src", $(this).attr("src").split("-off").join("-on"));
    }, function () {
        $(this).attr("src", $(this).attr("src").split("-on").join("-off"));
    });

    $('#EventA').click(function () {
        $('#EventForm').show();
    });

    $('#ListA').click(function () {
        $('#ListForm').show();
    });

    $('#SucideA').click(function () {
        $('#SucideForm').show();
    });

    $('#CheckA').click(function () {
        $('#CheckForm').show();
    });

    $('#PressA').click(function () {
        $('#PressADiv').show();
        $('#PressA').hide();
    });

    $('#PressB').click(function () {
        $('#PressBDiv').show();
        $('#PressB').hide();

    });



  



    /*
    $('#FlashPlayerStill').click(function() {
    $('#Video2Image').click();
    });

    $('.Video1Link').hover(function() {
    $('#Video1Image').attr("src", $('#Video1Image').attr("src").split("Off").join("On"));
    }, function() {
    $('#Video1Image').attr("src", $('#Video1Image').attr("src").split("On").join("Off"));
    });

    $('.Video2Link').hover(function() {
    $('#Video2Image').attr("src", $('#Video2Image').attr("src").split("Off").join("On"));
    }, function() {
    $('#Video2Image').attr("src", $('#Video2Image').attr("src").split("On").join("Off"));
    });
    $('.Video3Link').hover(function() {
    $('#Video3Image').attr("src", $('#Video3Image').attr("src").split("Off").join("On"));
    }, function() {
    $('#Video3Image').attr("src", $('#Video3Image').attr("src").split("On").join("Off"));
    });
    
    
    $('.Video1Link').click(function() {
    $('#Video1Image').attr("src", "/images/Clip1.gif");
    $('#Video2Image').attr("src", "/images/Clip2Off.gif");
    $('#Video3Image').attr("src", "/images/Clip3Off.gif");


    var flashvars = {};
    var params = { allowfullscreen: 'false', bgcolor: '#000000' };
    var attributes = {};

    $('#TopNav').focus();
    if (IsSpanish) {
    swfobject.embedSWF("/Videos/Spanish_Trailer/Spanish_Trailer.swf", "FlashVideo", "430", "362", "10.0.0", "/Videos/expressInstall.swf", flashvars, params, attributes);
    }
    else {
    swfobject.embedSWF("/Videos/Trailer_English/Trailer_English.swf", "FlashVideo", "430", "322", "10.0.0", "/Videos/expressInstall.swf", flashvars, params, attributes);
    }

    $('#FlashPlayerStill').hide();
    $('#FlashVideo').show();
    });


    $('.Video2Link').click(function() {
    $('#Video1Image').attr("src", "/images/Clip1Off.gif");
    $('#Video2Image').attr("src", "/images/Clip2.gif");
    $('#Video3Image').attr("src", "/images/Clip3Off.gif");


    var vimeoId;
    if (IsSpanish) {
    vimeoId = 8070632;
    }
    else {
    vimeoId = 8130573;
    }

    var flashvars = {
    clip_id: vimeoId,
    show_portrait: 0,
    show_byline: 0,
    show_title: 0,
    color: 'ffffff',
    hd_off: 1,
    js_api: 1, // required in order to use the Javascript API		 
    js_onLoad: 'vimeo_player_loaded', // moogaloop will call this JS function when it's done loading (optional)
    js_swf_id: 'FlashVideo' // this will be passed into all event methods so you can keep track of multiple moogaloops (optional)
    };
    var params = {
    allowscriptaccess: 'always',
    allowfullscreen: 'false',
    bgcolor: '#000000'
    };
    var attributes = {};

    $('#TopNav').focus();
    swfobject.embedSWF("http://vimeo.com/moogaloop.swf", "FlashVideo", "480", "270", "9.0.0", "/Videos/expressInstall.swf", flashvars, params, attributes);

    $('#FlashPlayerStill').hide();
    $('#FlashVideo').show();
    });

    $('.Video3Link').click(function() {
    $('#Video1Image').attr("src", "/images/Clip1Off.gif");
    $('#Video2Image').attr("src", "/images/Clip2Off.gif");
    $('#Video3Image').attr("src", "/images/Clip3.gif");

    var flashvars = {};
    var params = { allowfullscreen: 'false', bgcolor: '#000000' };
    var attributes = {};

    $('#TopNav').focus();
    if (IsSpanish) {
    swfobject.embedSWF("/Videos/30_min_Spanish/30_min_Spanish.swf", "FlashVideo", "430", "362", "10.0.0", "/Videos/expressInstall.swf", flashvars, params, attributes);
    }
    else {
    swfobject.embedSWF("/Videos/30_min_Eng/30_min_Eng.swf", "FlashVideo", "430", "322", "10.0.0", "/Videos/expressInstall.swf", flashvars, params, attributes);
    }

    $('#FlashPlayerStill').hide();
    $('#FlashVideo').show();
    });


    */



});
    /*
var vimeo = false;
function vimeo_player_loaded(swf_id) {
    vimeo = document.getElementById(swf_id);
    vimeo.api_play();
}
*/
