/*******************************************************************************

	CSS on Sails Framework
	Title: LunchBots
	Author: XHTMLized (http://www.xhtmlized.com/)
	Date: November 2011

*******************************************************************************/


$(document).ready(function() {

	$('ul li:last-child, tr td:last-child, tbody tr:last-child').addClass('last');
	
	

	Cufon.replace('.page-id-36 h1, .page-id-40 h1, .page-id-28 h1, .page-id-10 h1, .page-id-24 h1, .which-product h1, .which-product h2, .widgetfollow, .scrollable .title, .products-comparison th, .products-comparison td:first-child, .slogan, .container #blogcontent h2', {fontFamily: 'Helvetica Neue Roman'});
	
	Cufon.replace('.shop h3, .widget h3', {fontFamily: 'Helvetica Neue Roman', 'font-weight' : 'bold'});
	
	if ($('.container').hasClass('home')) {
			$('div.navi').tabs('ul.items > li',{
				effect: "fade",
				fadeOutSpeed: "fast",
				rotate: true
			}).slideshow({
				interval: 4000
				});setTimeout('$("div.navi").data("slideshow").play();', 3000);
	};
	
	$("li[rel].newsletters").overlay();
	
	if ($('body').hasClass('page-id-40')) {
		$('tr:odd').addClass('odd');
	}
	
	if ($('body').hasClass('page-id-36')){
	
		
	
		$('h2').after('<span class=\"icon\"></span>');
		$('h2').after('<span class=\"spike\"></span>');
	
		$('.more + div').addClass('to-show');
		$('.to-show').hide();

		$('.more').click(function(event){
			event.stopPropagation();
			/* $(this).toggleClass('show-more'); */
			$(this).parent().addClass('expanded');
			
			 
			$('.expanded div').show('slow');
			$('.expanded .more, .expanded .spike').hide();
			

			
		});
		
			$('body').click(function(){
				$('.expanded div').hide('slow');
				$('.expanded .more, .expanded .spike').show();
				$('.expanded').removeClass('expanded');
			});
		
		
	
	};
		
	if ($('body').hasClass('product')){
		
	};
	
	if ($.browser.msie){
		$(function() {
		    if (window.PIE) {
		        $('.cloud, img.framed, .overlay input[type="submit"], .overlay').each(function() {
		            PIE.attach(this);
		        });
		    }
		});
	};

});





