/* Run the Nice Custom Cufon Fonts */
/*Cufon.replace('#dropmenu', { hover: true, fontFamily: 'Museo' });
Cufon.replace('#heading h1', { textShadow: '1px 1px #5a5a5a', fontFamily: 'PT Sans' });
Cufon.replace('.homepage-longbox h3', { fontFamily: 'PT Sans' });
Cufon.replace('.homepage-icons h3', { fontFamily: 'Museo' });
Cufon.replace('.homepage-icons h4', { hover: true, fontFamily: 'Museo' });
Cufon.replace('.homepage-carouselbox h3', { fontFamily: 'PT Sans' });
Cufon.replace('.quote-bar .quoteleft', { fontFamily: 'Museo' });
Cufon.replace('.quote-bar .quoteright', { hover: true, fontFamily: 'PT Sans' });
Cufon.replace('#slideshownav', { textShadow: '1px 1px #434343', hover: true, fontFamily: 'PT Sans' });
Cufon.replace('.main h1, .main h2, .main h3, #sidebar h1, #sidebar h2, #sidebar h3, .main table thead td,', { hover: true, fontFamily: 'PT Sans' });
Cufon.replace('#footer-link-columns h3', { textShadow: '1px 1px #3d3d3d', hover: true, fontFamily: 'PT Sans' });
Cufon.replace('.page-subtitle', { hover: true, fontFamily: 'Museo' });
Cufon.replace('.price', { fontFamily: 'Museo' });
Cufon.replace('.accordion .accToggler', {  hover: true, fontFamily: 'Museo' });
Cufon.replace('.homepage-carouselbox .viewmore', {  hover: true, fontFamily: 'Museo' });
Cufon.replace('.fadebox h2', {  hover: true, fontFamily: 'PT Sans' });
Cufon.replace('ul.imagelist-half .text h4', {  hover: true, fontFamily: 'Museo' });
Cufon.replace('ul.imagelist li h4', {  hover: true, fontFamily: 'Museo' });
Cufon.replace('.btn-home-more, .btn-home-check, a.btn-small-blue, a.btn-small-orange, a.btn-small-grey, a.btn-big-blue, a.btn-big-orange, a.btn-big-lila, a.btn-big-grey, .form-button-right', {  hover: true, fontFamily: 'Museo' });*/

/* Start Home Carousel, Portfolio Image Hover Effect, Pretty Photo, Text Overflow */
jQuery(document).ready(function() {
  /* the carousel */
  $('#portfolio-carousel').infiniteCarousel();
  /* portfolio image effect */
  /*$("img.a").hover(
  function() {  $(this).stop().animate({"opacity": "0.4"}, "slow");  },
  function() {  $(this).stop().animate({"opacity": "1"}, "slow");  });*/
  /*$("img.pthumb").hover(
  function() {  $(this).stop().animate({"opacity": "0.4"}, "slow");  },
  function() {  $(this).stop().animate({"opacity": "1"}, "slow");  });*/
  /* pretty photo responds on rel='prettyPhoto' */
 // $("a[rel^='prettyPhoto']").prettyPhoto();
});


/* Start Main Menu */
jQuery(document).ready(function() {
jQuery("#dropmenu ul").css({display: "none"}); // Opera Fix
jQuery("#dropmenu li").hover(function(){
        jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(168);
        },function(){
        jQuery(this).find('ul:first').css({visibility: "hidden"});
        });
});

/* Start FAQ Accordion */
/* rollovers on images named with _off and _on */
jQuery(document).ready(function() {
		// Preload all rollovers
		$("#heading img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace('_off', '_on');
			newImg = new Image(); // create new image obj
			$(newImg).attr("src", rollON); // set new obj's src
		});
		// Navigation rollovers
		$("#heading a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");

			if (typeof(imgsrc) != 'undefined') {
			imgsrcON = imgsrc.replace('_off', '_on');
			$(this).children("img").attr("src", imgsrcON);
			}
		});
		// Handle mouseout
		$("#heading a").mouseout(function(){
			if (typeof(imgsrc) != 'undefined') {
			$(this).children("img").attr("src", imgsrc);
			}
		});

});

/* external links target blank */
jQuery(document).ready(function() {
	    $('a[rel*=external]').click( function() {
	        window.open(this.href);
	        return false;
	    });
});



