﻿/*SLIDING BANNERVARIABLES TO MODIFY:TIME: for the timing between each transitionTRANSITION: the kind of transition between each slide. These are the available transitions:*  blindX* blindY* blindZ* cover* curtainX* curtainY* fade* fadeZoom* growX* growY* scrollUp* scrollDown* scrollLeft* scrollRight* scrollHorz* scrollVert* shuffle* slideX* slideY* toss* turnUp* turnDown* turnLeft* turnRight* uncover* wipe* zoomCurrent Transition: fade*/var images = [];var time = 11000;var transition = "fade";var bannerIsLoaded = false;$(document).ready(function() {    if (bannerIsLoaded == false) {        doAjax();    }});function doAjax() {    $.ajax({        url: "slideshow/currentXML.xml",        type: "GET",        //file reference needs to be updated once the Classical89 website is moved from my C: drive to a network drive        dataType: "xml",        error: function() {            alert("An error occurred while loading XML file");        },        success: function(xml) {            xmlDoc = $(xml);            $(xml).find('highlight').each(function() {                //create the array of images                var image = $(this).attr('imgName');                images[images.length] = image;                var div = $('<div></div>')				.attr("class","BannerContain")                //.prependTo("#divJSBanner");                .appendTo("#divJSBanner");                    var overlay = $('<div></div>')                .attr("id", "divJSText")                .appendTo(div);				                var link = $('<a></a>')                .attr("href", $(this).find('url').text())                .appendTo(div);                var newImg = $('<img></img>')                .attr("src", "slideshow/images/" + image)                .attr("class", "image")                .appendTo($(link));                                var cap = $('<div></div>')                .attr("id", "caption")                .html($(this).attr('title'))                .appendTo(div);                 if ($(this).find('subtitle').text().length >= 1) {                    var subtitle = $('<div></div>')                    .attr("id", "subtitle")                    .html($(this).find('subtitle').text());                    subtitle.appendTo(div);                }                var desc = $('<div></div>')                .attr("id", "description")                .html($(this).find('description').text())                .appendTo(div);                var learnMore = $('<a></a>')                .attr("href", $(this).find('url').text())                .html("<hr id='divDash' />Order Now!")                .attr("class", "learnMore")                .appendTo(div);								if ($(this).attr('title').length >= 24) {					learnMore.css({ position: 'absolute',top:'217px'});				}				                            }); //xml                //TRANSITIONS            $('#divJSBanner')                .cycle({                    fx: transition,                    speed: 'slow',                    timeout: time,                    pager: '#navigation'                }); //cycle        }    });           //close $.ajax(}
