jQuery.noConflict();
/*
* Custom jQuery methods
*/
jQuery.fn.exists = function() { return jQuery(this).length > 0; }

jQuery(document).ready(function() {

	if (jQuery.browser.msie && jQuery.browser.version == '9.0') {
		jQuery('div.menu_top table td a').css('padding', '5px 23px');
	}

	// initialize search watermark
	//    jQuery('input#txtSearch').watermark('Search AmericanEHR');

    // if carousel exists...
    if (jQuery('div.carousel').length > 0) {

        // initialize carousel
        jQuery('div.carousel').jCarouselLite({
            btnNext: 'img.arrow_next',
            btnPrev: 'img.arrow_prev',
            auto: 8000,
            speed: 1500,
            scroll: 1,
            visible: 7
        }).load(function() { jQuery('div.carousel').attr('visibility', 'visible'); });

        // initialize arrow hover
        if (!jQuery.browser.msie) {
            jQuery('a img, div.vendor td.arrow img').not('.carousel-left a img').hover(
              function() { jQuery(this).css('opacity', 0.8); },
              function() { jQuery(this).css('opacity', 1.0); }
            );           
        }
    }

    // initialize image hover
    // jQuery('a img').hover(
    // function() { jQuery(this).css('opacity', 0.6); },
    // function() { jQuery(this).css('opacity', 1.0); }
    //);

    //    jQuery('div.menu_top a img').hover(
    //   function() { jQuery(this).css('opacity', 1.0); },
    //    function() { jQuery(this).css('opacity', 1.0); }
    //  );
    // if IE6...
    if (jQuery.browser.msie && jQuery.browser.version == 6) { jQuery('a img').unbind('mouseenter mouseleave'); }

    // set internal left menu height
    jQuery('.RadTreeView_LeftSubNav').css('height', jQuery('div.main_content').height() + 'px');

    // prepend slected item marker/set height
    jQuery('.RadTreeView_LeftSubNav div.rtSelected').prepend('<div class="marker"><!----></div>');
    jQuery('.RadTreeView_LeftSubNav a').click(function() { jQuery('.RadTreeView_LeftSubNav div.rtSelected div.marker').hide(); });

    // prepend arrow marker to left menu sub items
    jQuery('.RadTreeView_LeftSubNav ul ul div').prepend('<img src="/images/arrow_red.png" alt="" />');

    //rounded corners for background on podcast sponsor
    if(jQuery('div.divPodcastSponsorImage').length > 0)
    {
        jQuery('div.divPodcastSponsorImage').corner('10px');
    }
});


