Cufon.replace('#mainNav ul li p, .search_list li a, .search_list li .element_style, .search_list li ul li label, .leftContNav li a, .contTitle, .list_block a, .list_block1 a, .parts-box span, .welcome-box p, .title-form p, .left-nav a, .error-message-box p, .catalog-product-compare-index .product-price-text', {hover: true, 'fontFamily' : 'Lucida Grande'});
Cufon.replace('.newprodreg-entry, .bundle h3, .support-col h1, .support-col h2, .support-col h3, .support-col h4, .page-title h2, #mainNav ul li h3, .drop-list li a, .drop-list li h2, .footer_block a, .footer_block h4, #content h1, .title-gray, .container_element1 h2, .list_block h4, .list_block1 h4, element_style, .col-right .box-title h3, .manual-view a, .online-res a, .retailer-box .title h2, .submit-button span, .box-title h3, .compare-button, .product-collateral h2, .accessories-button, .link-wishlist, .find-button, .add-button span, .button-add span, .learn-more span, .content-title h2, .title-form h3, .create-account .title h4, .create-account .submit-button span, .title-botder, #login-form h2, .new-users button, .registered-users button, .form-button, .stylecufonbtn, .button-set .leftback, .create-accaunt .leftback, .create-accaunt .legend, .discount h2, .shipping  h2, .cart .button span, .shipping-form .button span, .newsletter-manage-index .back-link a, .newsletter-manage-index button, .step-title h2, #co-billing-form button, #shipping-buttons-container button, #shipping-method-buttons-container button, #payment-buttons-container button, #checkout-review-table thead, #checkout-review-submit button, #checkout-step-login h3, #checkout-step-login .col-2 button, #checkout-step-login .col-1 button, .customer-address-index .back-link a, .customer-address-index .title-form button, .customer-account-index #my-orders-table thead, .sales-order-history #my-orders-table thead, .box-tags button, .tag-customer-view .btn-cart span, .tag-customer-index .back-link a, #messages_product_view .title_mess h3, .checkout-cart-index #shopping-cart-table th, .checkout-onepage-success .buttons-set button, .ustorelocator-location-map .form-button, .sales-order-view #my-orders-table th, .review-customer-view .buttons-set a, .checkout-multishipping-addresses .button span, .checkout-multishipping-addresses .buttons-set a, .productregistration-register-step2 .page-head h3, .productregistration-register-step2 .prodreg-group h3, .suport-col-box h3, .online-res p, .suport-logo-box h4, .suport-search-form span, .addresses-book-new-box .title h4, .productregistration-register-step2 .register-title h3, .productregistration-register-step2 .title-login h3, .customer-account-create #login-form .button span, .customer-account-create .block-title-login span, #mainNav ul li a span, .cms-support #content .page_fullcolumn h2, .cms-support #content .page_fullcolumn h3, .silver-button-def, .br-button-def, .silver-link-b-def, .br-link-b-def, .form-def .form-def-title h3', {letterSpacing: '-0.20px', 'fontFamily' : 'Archer Semibold'});

Cufon.replace('.am-cursive, .product_information .info_title, .title-46, .title-25, .product-col a, .star-title, p.note-msg, .parts-box h2, .product-title h2, .review-customer-view .product-name, .title-28, .product_information h2 a,', {hover: true, 'fontFamily' : 'Archer Medium'});

Cufon.replace('.result_block li a, .result_block li span, .bold_element, .title-13, .catalog-category-view #content .category-products .product-col p', {hover: true, 'fontFamily' : 'Lucida Grande'});

Cufon.replace('.productSubheading, .suport-logo-box h3', {hover: true, fontFamily: 'Archer Book' });

jQuery(".pt25 .grid_6 a img:odd").addClass("last-item");
jQuery(".cms-support #content .page_fullcolumn:first").addClass("left-support-col");
jQuery(document).ready(function(){
  //tabcenter								
  var ulWidth = 0;
		jQuery('.product-tabs li').each(function(index) {
			ulWidth += jQuery(this).width() + 7;
		});
		jQuery('.product-tabs').width(ulWidth);							
  //Activate review tab
  jQuery('.review_tab_act').click(function(){	  
        //_gaq.push(['_trackEvent', 'ProductPages', 'Click', 'ReviewsTab']);
        _gaq.push(['_trackEvent', 'ProductPageDesc', 'AddReadReview', document.getElementById('skuID').innerHTML, 0, true]);

       var review_tab = jQuery('#product_tabs_reviews'); 
       var review_content = jQuery('#product_tabs_reviews_contents');
       review_tab.addClass('active');
       review_tab.siblings('li').removeClass('active');
       review_content.show();
       review_content.siblings('div.product-tabs-content').hide();
 });  
  
  //Activate support tab
  jQuery('.support_tab_act').click(function(){
         //_gaq.push(['_trackEvent', 'ProductPages', 'Click', 'SupportTab']);
         _gaq.push(['_trackEvent', 'ProductPageDesc', 'GetManual', document.getElementById('skuID').innerHTML, 0, true]);

        var review_tab = jQuery('#product_tabs_support'); 
        var review_content = jQuery('#product_tabs_support_contents');
        review_tab.addClass('active');
        review_tab.siblings('li').removeClass('active');
        review_content.show();
        review_content.siblings('div.product-tabs-content').hide();
  }); 
    
  starRating.create('.stars');
  jQuery(".close_mess").hover(
  function () {
    jQuery(this).css("cursor",'pointer');
  },
  function () {
    jQuery(this).css("cursor",'none');
    }
  );
  
  jQuery('.close_mess').click(function() {
    jQuery('#messages_product_view').fadeOut();
  });  
  
  
	jQuery('#topNav li').first().addClass('bg-none');
	jQuery('#mainNav').children().last().addClass('bg-none');
	jQuery('#mainNav ul').show(); //--- Fix Menu Flash 2/2 ----
	jQuery('#mainNav li').first().addClass('pl1');
	Cufon.replace(jQuery('#mainNav').children().children('a'), {letterSpacing: '-0.20px', 'fontFamily' : 'Archer Semibold'});
	Cufon.replace(jQuery('#mainNav-right').children().children('a'), {letterSpacing: '-0.20px', 'fontFamily' : 'Archer Semibold'});
	
	
	
//-------------DROP DOWN-------------------------------------------------------------
	jQuery('#mainNav').children().children('ul').wrap(jQuery('<div class="mn-top"><div class="mn-bottom"><div class="mn-cont"></div></div></div>'));
	jQuery('<span class="mnb-left"></span><span class="mnb-right"></span>').appendTo(jQuery('.mainNav-blk'));
    jQuery('div.mn-top').parent('li').children('a.level-top').attr('href','#').css('cursor','default');
    jQuery('<div class="mn-arrow"></div>').appendTo(jQuery('#mainNav').children());
    jQuery('#mainNav').children().hover(function(){
		jQuery(this).children('div.mn-top').show();
		var gW = 0;
		jQuery(this).prevAll().each(function(index){
			gW += this.offsetWidth;
		});
		var arWidth =gW + parseInt(parseFloat(this.offsetWidth)/2)-5;
		jQuery('.mn-arrow').css('left', arWidth);
//		//----------------------------------------------------------------
			var $newUL = jQuery(this).children('div').children('div').children('div').children('ul');
			if($newUL.length != 0)
			{
					jQuery(this).children('div.mn-arrow').show();
			}
//			var $newULParent = $newUL.parent();
//			listItems=jQuery($newUL).last().children('li').length;
//			lich = parseInt($newUL.children('li').length / 8);
//			i=0;
//			while( i<lich ){
//				i= i+1;
//				listItems=jQuery($newUL).last().children('li');
//		        $newUL = jQuery('<ul></ul>');
//				if (listItems.length > 8){
//        			listItems.slice(8).appendTo($newUL);
//					$newUL.appendTo($newULParent);
//				}
//		   }
//		//----------------------------------------------------------------

	},
	 function(){
		 jQuery(this).children('div').hide();	
		 jQuery(this).parent().parent().children('div.mn-arrow').hide();
	 }	
	);
	
//------------- END DROP DOWN-------------------------------------------------------------	

	jQuery('.chekList').children().first().addClass('br-none');
	jQuery('.chekList ul li').first().addClass('br-none pt0');
     jQuery("#homeImageBreville").sudoSlider({ 
            numeric: true,
            fade: true,
            prevNext: true,
            startSlide: 1,
            updateBefore: true
            
        });
     
 });
  
function formrule(field)
{
  if (field.defaultValue == field.value) field.value = "";
}
function formrule2(field) {
  if (field.value == "") {
    field.value = field.defaultValue;
  }
}

// The widget
var starRating = {
  create: function(selector) {
    // loop over every element matching the selector
    jQuery(selector).each(function() {
      var jQuerylist = jQuery('<div></div>');
      // loop over every radio button in each container
      jQuery(this)
        .find('input:radio')
        .each(function(i) {
          var rating = jQuery(this).parent().text();
          var jQueryitem = jQuery('<a href="#"></a>')
            .attr('title', rating)
            .addClass(i % 2 == 1 ? 'rating-right' : '')
            .text(rating);
          
          starRating.addHandlers(jQueryitem);
          jQuerylist.append(jQueryitem);
          
          if(jQuery(this).is(':checked')) {
            jQueryitem.prevAll().andSelf().addClass('rating');
          }
        });
        // Hide the original radio buttons
        jQuery(this).append(jQuerylist).find('label').hide();
    });
  },
  addHandlers: function(item) {
    jQuery(item).click(function(e) {
      // Handle Star click
      var jQuerystar = jQuery(this);
      var jQueryallLinks = jQuery(this).parent();
      
      // Set the radio button value
      jQueryallLinks
        .parent()
        .find('input:radio[value=' + jQuerystar.text() + ']')
        .attr('checked', 'checked');
      
      // Set the ratings
      jQueryallLinks.children().removeClass('rating');
      jQuerystar.prevAll().andSelf().addClass('rating');
      
      // prevent default link click
      e.preventDefault();
          
    }).hover(function() {
      // Handle star mouse over
      jQuery(this).prevAll().andSelf().addClass('rating-over');
    }, function() {
      // Handle star mouse out
      jQuery(this).siblings().andSelf().removeClass('rating-over')
    });    
  } 
}

window.onload = function(){
	var imgSliderHeight = jQuery('.catalog-category-view #content .carusel_wrapper p img').height() + 23;
	jQuery('.catalog-category-view #content .carusel_wrapper').css('height', imgSliderHeight);
}

