//<![CDATA[ 
$(document).ready(function(){ 
	$("p:empty").hide();
	
    $('a[rel*=external]').click( function() {
    		window.open(this.href);
    		return false;
    	});

    $('select#websites-jump-select').selectmenu({width: 190, style:'dropdown', maxHeight: 350});
    $('select#archive-jump-select').selectmenu({width: 150, style:'dropdown', maxHeight: 350});
    $('select.dob-jump-select').selectmenu({width: 70, style:'dropdown', maxHeight: 350});
    $('select.wide-jump-select').selectmenu({width: 190, style:'dropdown', maxHeight: 350});

    $('#homepage-top-rotator').cycle({ 
        fx:     'fade', 
        speed:  1500, 
        timeout: 10000 
    });
	
    $('#news-scroller-bar-cycle').cycle({ 
        fx:     'scrollHorz', 
        speed:  'fast', 
        timeout: 5000, 
        next:   '.news-scrollbutton-next', 
        prev:   '.news-scrollbutton-prev' 
    });

    $('#news-scroller-scrollcaption')
    .bind('mousewheel', function(event, delta) {
        if (delta > 0)
        {
        	$('#news-scroller-bar-cycle').cycle('next');
        }   
        else
        {
        	$('#news-scroller-bar-cycle').cycle('prev');
        }
          
    });
    
    /*Submit button button styles*/
    
    $('.submitBtn').hover(
	// mouseover
	function(){ $(this).addClass('submitBtnHover'); },
	
	// mouseout
	function(){ $(this).removeClass('submitBtnHover'); }
	);	


    $('#patientstories-cycle').cycle({ 
        fx:     'scrollHorz', 
        speed:  'fast', 
        timeout: 0,
        height: 225,
        next:   '#patientstories-cycle-next', 
        prev:   '#patientstories-cycle-prev' 
    });

    $('#leavingwithbreak-cycle').cycle({ 
        fx:     'scrollHorz', 
        speed:  'fast', 
        timeout: 0,
        height: 225,
        next:   '#leavingwithbreak-cycle-next', 
        prev:   '#leavingwithbreak-cycle-prev' 
    });

    $('#inthenews-cycle').cycle({ 
        fx:     'scrollHorz', 
        speed:  'fast', 
        timeout: 0, 
        height: 225,
        next:   '#inthenews-cycle-next', 
        prev:   '#inthenews-cycle-prev' 
    });

    $('.casestudy_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.casestudy_cycle_next' , 
        prev:   '.casestudy_cycle_prev' 
    });

    $('.pimpmycast_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.pimpmycast_cycle_next' , 
        prev:   '.pimpmycast_cycle_prev' 
    });

    $('.news_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.news_cycle_next' , 
        prev:   '.news_cycle_prev' 
    });

    $('.video_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.video_cycle_next' , 
        prev:   '.video_cycle_prev' 
    });

    $('.recipe_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.recipe_cycle_next' , 
        prev:   '.recipe_cycle_prev' 
    });

    $('.cookingtip_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.cookingtip_cycle_next' , 
        prev:   '.cookingtip_cycle_prev' 
    });

    $('.comment_cycle').cycle({ 
        fx:     'scrollVert', 
        speed:  'normal', 
        timeout: 0, 
        next:   '.comment_cycle_next' , 
        prev:   '.comment_cycle_prev' 
    });

    

    $("#websites-jump-select").change(function(e) {
        window.location.href = this.options[this.selectedIndex].value;
    });

    $("#archive-jump-select").change(function(e) {
        window.location.href = this.options[this.selectedIndex].value;
    });

    $(".faq_q").click(function(e) {$(this).next(".faq_a").toggle() });
    $(".tip_q").click(function(e) {$(this).next(".tip_a").toggle() });
 

});

Cufon.replace('h1')('h2', {textShadow: '#fff 1px 1px'})('#enquire-orange h3')('#enquire-orange-telephone')('#inner-page-content-wrapper h3')('.lb-landing-text h4')('.explore-box-text h4');
//]]>    
