jQuery.noConflict();

// start the ajax contact form
		
			jQuery(document).ready(function(){
					jQuery('#sign_up').ajaxContactForm(
						'http://haymax.biz/php/send_ajax_sign_up_form.php',
						{language: 'en'});
			});
			
			// point all exernal links to a new page
			
			jQuery(document).ready(function(){
					jQuery("a[rel='external']").attr('target','_blank');
			});

  		// hide the named widget inner containers
		// put a hover intent and click slider on the widget title
		// set the show or hide state of text widgets containing a div class init_

			jQuery(document).ready(function(){
//					jQuery('.widgetinner').hide();
					jQuery('.init_show').parent().parent().show();
					jQuery('.init_hide').parent().parent().hide();
					jQuery('.toc-menu').children('#toc-inner').show();
					jQuery('#shopping-cart').children('.widget-inner').show();
					jQuery('#transposh').children('.widget-inner').show();
					jQuery('.widget_tag_cloud').children('.widget-inner').hide();
					jQuery('.widget_tag_cloud').children('.widget-title').toggleClass("hide");
					jQuery('.widget_links').children('.widget-inner').hide();
					jQuery('.widget_links').children('.widget-title').toggleClass("hide");
				
					jQuery('.toc-menu .widget-title').click(function(){
							jQuery(this).next('#toc-inner').toggle("medium");
							jQuery(this).toggleClass("hide");
					});
					jQuery('.toc-menu .widget-title').hover(function () {jQuery(this).addClass("hover");},
  														  function () {jQuery(this).removeClass("hover");});
					jQuery('#primary .widget-title').click(function(){
							jQuery(this).next('.widget-inner').toggle("medium");
							jQuery(this).toggleClass("hide");
					});
					jQuery('#primary .widget-title').hover(function () {jQuery(this).addClass("hover");},
  														  function () {jQuery(this).removeClass("hover");});
					jQuery('#secondary .widget-title').click(function(){
							jQuery(this).next('.widget-inner').toggle("medium");
							jQuery(this).toggleClass("hide");
					});
					jQuery('#secondary .widget-title').hover(function () {jQuery(this).addClass("hover");},
  														  function () {jQuery(this).removeClass("hover");});
			});

			jQuery(document).ready(function() {

    		//create scroller for each element with "testimonial_scroller" class...
    		jQuery('.testimonial_scroller').SetScroller({ velocity:    80,
                                            direction:   'horizontal',
                                            startfrom:   'right',
                                            loop:        'infinite',
                                            movetype:    'linear',
                                            onmouseover: 'pause',
                                            onmouseout:  'play',
                                            onstartup:   'play',
                                            cursor:      'pointer'
                                        });
         });
    /*
        All possible values for options...
        
        velocity:       from 1 to 99                                [default is 50]                     
        direction:      'horizontal' or 'vertical'                  [default is 'horizontal']
        startfrom:      'left' or 'right' for horizontal direction  [default is 'right']
                        'top' or 'bottom' for vertical direction    [default is 'bottom']
        loop:           from 1 to n+, or set 'infinite'             [default is 'infinite']
        movetype:       'linear' or 'pingpong'                      [default is 'linear']
        onmouseover:    'play' or 'pause'                           [default is 'pause']
        onmouseout:     'play' or 'pause'                           [default is 'play']
        onstartup:      'play' or 'pause'                           [default is 'play']
        cursor:         'pointer' or any other CSS style            [default is 'pointer']
    */
 
// put the add class and top buttons on selected faqs
	 
jQuery(document).ready(function(){

    jQuery("div#questions ul li a").click(function(){

        var selected = jQuery(this).attr('href');    

        selected += '"'+selected+'"'

        jQuery('.current-faq').removeClass();

        jQuery.scrollTo(selected, 400 , {offset:-50}); 

        jQuery(selected).addClass('current-faq',400);

        return false;

    });

    jQuery('.top-button').click(function(){

        jQuery('.current-faq').removeClass('current-faq',400);

        jQuery.scrollTo('0px', 800); 

        return false;

    });     

});
