
function pageStart() {
    jQuery.noConflict();
    jQuery(document).ready(function () {
        RunOnPostBack();
        setupContentScroller();
    }); 
}
function RunOnPostBack() {
    jQuery("a[rel^='prettyPhoto']").prettyPhoto();
}

var animationPanel;
function Begin(sender, args) {
    jQuery('input').blur();
    sender._postBackSettings.sourceElement.disabled = true 
    animationPanel = "." + sender._postBackSettings.sourceElement.getAttribute("rel") + "_animation_panel";
    jQuery(animationPanel).fadeIn('fast');
}
function End(sender, args) {
    animationPanel = "." + sender._postBackSettings.sourceElement.getAttribute("rel") + "_animation_panel";
    jQuery(animationPanel).fadeOut('fast');
    RunOnPostBack();
}
function ie6() {
    if (navigator.userAgent.toLowerCase().indexOf("msie 6") !== -1) {
        return true
    }
    else {
        return false
    }
}
/*var currentPanel;
function stepNav(_currentPanel) {
    currentPanel = _currentPanel
    jQuery(".browser_navigation").children("li").children("a").each(function () {
        this.className = this.className.replace(" on", "");
    })
    try {
        jQuery(".browser_navigation").children("li").children("a")[currentPanel - 1].className += " on";
    }
    catch (err) {

    }
}
function stepClick(id, panelNumber) {
    stepNav(panelNumber);
    stepcarousel.stepTo(id, panelNumber);
    return false;
}*/
function setupContentScroller() {
   /*jQuery("a[class*='arrow_']").click(function (e) {
        var selectedPanelNumber = parseInt(this.className.split("arrow_")[1].split(" ")[0]);
        if (this.className.indexOf(" on") !== -1) {
            return true;
        }
        else {
            stepClick("carousel", selectedPanelNumber)
            return false;
        }
    });

    // Setup Enquire Only
    jQuery(".contact_click").click(function (e) {
        this.className = this.className + " on";
        jQuery(this).qtip("hide");
        this.blur();
        stepcarousel.stepTo("carousel", 2);
    });

    // Setup Back Button
    jQuery(".enquire_back").click(function (e) {
        stepcarousel.stepTo("carousel", 1);
        jQuery(".contact_click").each(function(){
            this.className = this.className.replace(" on", "");
        });
    });

    //jQuery(".arrow_1").click();
    //stepcarousel.stepTo("carousel", 1);*/
}

function EnquirePostBack() {
    setTimeout('jQuery("#coda-slider-1").codaSlider.autoSlide', 5000);
}

function authoriseDownload(DownloadPath) {
    jQuery.prettyPhoto.open(DownloadPath + "?iframe=true&width=350&height=447", 'Download Request', '');
}
function prepareForDownloadWindow(downloadBtn) {
    HideqTip(downloadBtn);
}
function RemovePopUp() {
    setTimeout("parent.parent.jQuery.prettyPhoto.close()", 5000);
}


