// Yodelay Main JavaScript Document	
jQuery(document).ready(function(){
	jQuery('.featureblock').each(function(){
		jQuery(this).append('<span>'+jQuery("p", this).text().substring(0, 60)+'... <a href="#pricing">More...</a></span>');
		jQuery("p", this).css("position", "absolute");
		jQuery("p", this).css("left", "75px");
		jQuery("p", this).css("top", "20px");
	});
	jQuery(".featureblock").mouseover(function(){
		jQuery("span", this).hide();
		jQuery("p", this).show();
	});
	jQuery(".featureblock").mouseout(function(){
		jQuery("span", this).show();
		jQuery("p", this).hide();
	});
    jQuery("#keyphraseselect").change(function() {
        var src = jQuery(this).val();
        jQuery("#displaygraph").html("<img src='" + src + "'>");
    });
	jQuery(".dashbox").hover(function(){
		jQuery(".postit").html(jQuery(this).attr("tit"));
	});
	jQuery(".dashbox").hover(function(){
		jQuery(".postit").html(jQuery(this).attr("data-postit"));
	});
	jQuery(".packagepane[title]").tooltip({
		//effect: 'fade',
		//fadeInSpeed: 0,
		//fadeOutSpeed: 600,
		position: 'center left',
		offset: [-64, 8],
		delay: 0,
		tipClass: 'packagetip'
	});
	jQuery(".iconlink[title]").tooltip({
		effect: 'fade',
		position: 'bottom center',
		offset: [0, 0],
		delay: 0,
		tipClass: 'connecttip'
	});
	jQuery(".roundedbox a[title]").tooltip({
		effect: 'fade',
		position: 'center left',
		offset: [0, -15],
		delay: 0
	});
	jQuery(".steps a[title]").tooltip({
		effect: 'fade',
		position: 'bottom center',
		offset: [-15, 75],
		delay: 0
	});
	jQuery(".pctip li a[title]").tooltip({
		effect: 'fade',
		position: 'center right',
		tipClass: 'formtip',
		offset: [0, 10],
		delay: 0
	});
	jQuery(".mu_register a[title]").tooltip({
		effect: 'fade',
		position: 'bottom center',
		offset: [5, 100],
		delay: 0,
		tipClass: 'connecttip'
	});
	jQuery(".members").tooltip({
		effect: 'fade',
		position: 'bottom center',
		offset: [-55, 0],
		delay: 0,
		tipClass: 'connecttip'
	});
	jQuery("input[title]").tooltip({
		effect: 'fade',
		position: 'center right',
		offset: [0, 0],
		delay: 0,
		tipClass: 'formtip'
	});
	jQuery("textarea[title]").tooltip({
		effect: 'fade',
		position: 'bottom right',
		offset: [-125, 0],
		delay: 0,
		tipClass: 'formtip'
	});
	jQuery("#fullday1").click(function(){
		jQuery('#request_booking_datem1').attr('checked', 'checked');
		jQuery('#request_booking_datea1').attr('checked', 'checked');
	});
	jQuery("#fullday2").click(function(){
		jQuery('#request_booking_datem2').attr('checked', 'checked');
		jQuery('#request_booking_datea2').attr('checked', 'checked');
	});
	jQuery("#fullday3").click(function(){
		jQuery('#request_booking_datem3').attr('checked', 'checked');
		jQuery('#request_booking_datea3').attr('checked', 'checked');
	});
	jQuery("#fullday4").click(function(){
		jQuery('#request_booking_datem4').attr('checked', 'checked');
		jQuery('#request_booking_datea4').attr('checked', 'checked');
	});

	jQuery('blockquote').before('<img src="http://www.yodelay.com/images/speechbubblequote.gif" style="float: left; position: relative; top: 15px; left: 40px;" />');
	jQuery('blockquote').after('<img src="http://www.yodelay.com/images/speechbubbleafter.png" style="float: left; position: relative; top: -15px; left: 50px;" />');
	//jQuery('.proceed').before('<img src="http://www.yodelay.com/flash/arrowleft.gif" style="float: left; position: relative; top: 5px; left: 255px;" />');
	//jQuery('#user_email').after('<img src="http://www.yodelay.com/flash/arrowright.gif" style="float: right; position: relative; top: -2px; left: -75px;" />');
	//jQuery('#user_name').after('<img src="http://www.yodelay.com/flash/arrowright.gif" style="float: right; position: relative; top: -2px; left: -75px;" />');
	jQuery('#showhideblock').hide();
	jQuery('#showhidelink').click(function() {
  		jQuery('#showhideblock').slideToggle('slow', function(){
    		if(jQuery('#showhidelink').text() == 'Show More') {
				jQuery('#showhidelink').text('Hide More');
			} else {
				jQuery('#showhidelink').text('Show More');
			}
  		});
	});
						
	jQuery("#search-bar a[rel]").overlay({
		//effect: 'apple',
		speed: 1000,
		top: '20%'
	});
	jQuery(".pagesidebar a[rel]").overlay({
		//effect: 'apple',
		speed: 1000,
		top: '20%'
	});
	jQuery("a.button[rel]").overlay({
		//effect: 'apple',
		speed: 1000,
		top: '20%'
	});
	jQuery("a.linkedin[rel]").overlay({
		//effect: 'apple',
		speed: 1000,
		top: '20%'
	});
			
    jQuery("ul.tabs").tabs("div.panes > div", {
		effect: 'fade',
		initialIndex: 1
	});
	
jQuery("#hidegrass").click(function(){
	jQuery("#grassyknoll").hide();
	jQuery.cookie("hidegrass", 1);
});
	if(!jQuery.cookie("hidegrass") == 1) {
		jQuery("#grassyknoll").show();
	}
jQuery("#hidepostit").click(function(){
	jQuery("#hidepostit").parent().hide();
	jQuery.cookie("postitmessage", 1);
});
	if(!jQuery.cookie("postitmessage") == 1) {
		jQuery("#hidepostit").parent().show();
	}
jQuery("#hidespeechbot").click(function(){
	jQuery("#speechbot").hide();
	jQuery.cookie("speechbot", 1);
});
	if(!jQuery.cookie("speechbot") == 1) {
		jQuery("#speechbot").show();
	}
});
//jQuery(function(){
	//jQuery('.scrolloverflow').jScrollPane();
//});

