jQuery.noConflict();
jQuery(document).ready(function(){

        jQuery(document).pngFix();

        jQuery("#featured").cycle({
            fx:     'fade',
            speed:  'fast',
            timeout: 0,
            next:   '#next',
            prev:   '#prev'
        });


        jQuery(".collapse").hide();
        jQuery(".collapse-handle").click(function(){
            var obj1 = jQuery(this);
            jQuery(".collapse").hide();
            var obj = jQuery(this).attr('rel');
            jQuery(obj).toggle();
            jQuery.scrollTo(obj1 ,800);

        });

        jQuery('#collapse-show').click(function(){
            jQuery(".collapse").show();

        });

        jQuery('#collapse-hide').click(function(){
            jQuery(".collapse").hide();

        });

        jQuery("a[rel^='prettyPhoto']").prettyPhoto();



});

/* Function that allows new windows to open when a link is clicked, that is complaint with XHTML 1.0 Strict standards */
function externalLinks() {
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for (var i=0; i<anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") &&
                anchor.getAttribute("rel") == "external")
                anchor.target = "_blank";
    }
}
window.onload = externalLinks;

/* Function that submits form on [Enter] */
function submitEnter(myfield,e)
{
    var keycode;
    if (window.event) keycode = window.event.keyCode;
    else if (e) keycode = e.which;
    else return true;

    if (keycode == 13) {
       myfield.form.submit();
       return false;
    } else {
       return true;
    }
}
