var currentCategory = "";
var currentSubCategory = "";

var iFrameWidth = 600;
var fadeInSpeed = 3000;

$(document).ready(function(){
    try {
        loadSlides();
    }
    catch(e) {
        doError(e);
    }
});

function flashPutHref(href) { 
	document.location.href = href; 
}

function loadSlides(event) {
    try {
        $("#container").empty();
        $("#container").append("<div id=\"flashSlideShow\"></div>");
        var flashVars = {initialURL: escape(document.location)};
        var flashParams = {
        		allowScriptAccess: "always", 
        		allowfullscreen: "true"
        	};
        var attribs = {
            id: "slideshow",
            name: "slideshow"
        };
        swfobject.embedSWF("slides-v2.swf", "flashSlideShow", "1024", "532", "9","",flashVars,flashParams,attribs);
    }
    catch(e) {
        doError(e);
    }
    finally {
    	this.blur();
    	if(event) event.preventDefault();
    }
}


function doError(e) {
    try {
        console.error(e);
    }
    catch(ignore) {
        // assume we don't have the console object from firebug.
        alert(e.fileName + " error: line " + e.lineNumber + "\n\n" + e.message);
    }
}