Cufon.replace('.mid_content .text,  .down_content p, .aboutLS h1, .sign_up h1, #footer h1', { fontFamily: 'soholt' });
Cufon.replace('.learn_more a, a.buy, .postImage .subheading, .entry .read_more, #bannerInn h2, .quote em', { fontFamily: 'sohobd' });
Cufon.replace('.heading, #sidebar h2, .price, .proDetail h3, #catList li h3, #proMain h3', { fontFamily: 'sohostd' });
Cufon.replace('#mid_wrapper p, #thumb_container li h3, #thumb_container li p, .breadcrumb span, #sidebar ul li#featuredProducts h3, #sidebar ul li#featuredProducts p, #relProducts li h3, #relProducts li p', { fontFamily: 'frutiger' });
Cufon.replace('#nav ul li a', {
fontFamily: 'soholt',
hover: {
color: '#000000'
}
});

Cufon.replace('.submenu li a', {
fontFamily: 'sohostd',
hover: {
color: '#000000'
}
});
Cufon.replace('.breadcrumb a', {
fontFamily: 'frutiger',
hover: {
color: '#000000'
}
});

jQuery(document).ready(function(){	
jQuery('#sidebar').corner("6px");
jQuery('#featuredProducts li a.buy').corner("5px");
jQuery('#relProducts').corner("10px");
jQuery("#thumb_container").carousel({ dispItems: 4 });
jQuery(function(){ jQuery('div.mid_content_fot, #catList').equalHeights(); });

jQuery('ul li:first-child').addClass("firstItem");
jQuery('ul li:last-child').addClass("lastItem");
jQuery('ul.arwList').find("li:odd").addClass('odd');

initMenu();

jQuery('#mid_wrapper .hBox').hover(function(){
	jQuery(this).addClass("hovered");
},function(){
	jQuery(this).removeClass("hovered");
	}); 

jQuery('.submenu li').each(function(){
var _si = jQuery(this).index()+1;
if(_si%4==0){
	jQuery(this).addClass("forthItem");
	}
if(_si%5==0){
	jQuery(this).addClass("fifthitem");
	}
});
jQuery('#catList li').each(function(){
var _si = jQuery(this).index()+1;
if(_si%3==0){
	jQuery(this).addClass("thirdItem");
	}
});
jQuery('input[type="text"], textarea').each(function() {
var default_value = this.value;
jQuery(this).css('color', '#666'); // this could be in the style sheet instead
jQuery(this).focus(function() {
if(this.value == default_value) {
this.value = '';
jQuery(this).css('color', '#333');
}
});
jQuery(this).blur(function() {
if(this.value == '') {
jQuery(this).css('color', '#666');
this.value = default_value;
}
});
});


jQuery("#page div.article").each(function(i)
{
jQuery(this).addClass("e"+ i);
});
jQuery(".submenu  li").each(function(i){
//var _qi = jQuery(this).index();
jQuery(this).addClass("s"+ i);
jQuery(this).click(function(e){
//e.preventDefault();
jQuery.scrollTo('.e'+ i, {duration: 500, onAfter:function(){
jQuery('.e'+ i).highlightFade({color:'#e1e1e1', speed: 600});
}});
});
});
jQuery('.btt').click(function(){

jQuery.scrollTo('#content', {duration: 500});

});
jQuery(".hBox").click(function(){
     window.location=jQuery(this).find("a").attr("href");
     return false;
});


jQuery('#slideshow').before('<ul id="nav">').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    pager:  '#thumbNav', 
    pagerAnchorBuilder: function(idx, slide) { 
        return '<li><a href="#"><img src="' + slide.src + '" width="54" height="54" /></a></li>'; 
    } 
});

});
function initMenu() {
  jQuery('#ourProducts li ul').hide();
  jQuery('#ourProducts li.active ul').show();
  jQuery('#ourProducts li a').click(
    function() {
		jQuery('#ourProducts li').removeClass('active');
		jQuery(this).parent().addClass('active');
      var checkElement = jQuery(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        jQuery('#ourProducts ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
      }
    );
  }

