jQuery.noConflict();

jQuery(document).ready(function(){
  
  //external link
  jQuery('a[class="external"]').click(function(){
    this.target = "_blank";
  });
  
  //print link
  jQuery('a[class="print"]').click(function(){
    window.print();
    return false;
  });
  
  //forms - focus
  jQuery("input[type=password], input[type=text], select, textarea").focus(function(){
    jQuery(this).addClass("focus");
  });
  jQuery("input[type=password], input[type=text], select, textarea").blur(function(){
    if (jQuery(this).find(".focus")) {
      jQuery(this).removeClass("focus");
    }
  });
  
  //forms - hover
  jQuery("input.submit").hover(function(){
    jQuery(this).addClass("hover");
  }, function(){
    jQuery(this).removeClass("hover");
  });

  //forms - overlabel
  //jQuery("#form_contact label").overLabel()
  
  //Cufon
  Cufon.replace('ul.menu li, div#payoff h2, div#content_primary h1, div#content_secondary p.cta, div#content_secondary p.cta_ie6',  {
    hover: true,
    fontFamily: 'bebas'
  });

  //Cycle
  //jQuery('div#slideshow ul').cycle({
  //  timeout: 5000
  //});

  //Fancybox
  //jQuery("a.gallery_image").fancybox();
  jQuery("a.more").click(function(){
    jQuery.fancybox({
      'padding': 0,
      'autoScale': false,
      'transitionIn': 'none',
      'transitionOut': 'none',
      'title': this.title,
      'width': 800,
      'height': 450,
      'href': this.href.replace(new RegExp("([0-9])", "i"), 'moogaloop.swf?autoplay=1&amp;clip_id=$1'),
      'type': 'swf',
      'swf': {
        'allowfullscreen': 'true',
        'wmode': 'transparent'
      }
    });
    return false;
  });
  
  //Media
  //jQuery('.media').media({
  //  width: 450,
  //  height: 250,
  //  autoplay: true,
  //  src: 'myBetterMovie.mov',
  //  caption: false
  //});

});

