// JavaScript Document

$(function() {
		   
	$("#accordion").accordion({autoHeight: false, collapsible: true});
		
	$('#askexpertsoverlay').dialog({
		bgiframe: true,
		height: 500,
		autoOpen: false,
		resizable: false,
		width: 772, 
		modal: true,
		title: '',
		buttons: {
			Close: function() {
				$(this).dialog('close');
			}
		}
	});
	
	$('#product-asktheexperts').click(function() {
		$('#askexpertsoverlay').dialog('open');
	});
	
	$('#product-share-textbutton').click(function() {
	  $('#product-share-iconcontainer').slideToggle('fast', function() {
		// Animation complete.
	  });
	});
	

	//$('#cart-nextsteparrow').hover(function() {
	  //$('#cart-nextsteparrow').effect('pulsate','slow');
	//});
	
	getTwitters('tweet', { 
	  id: 'baseformula', 
	  count: 1, 
	  enableLinks: true, 
	  ignoreReplies: true, 
	  clearContents: true,
	  template: '"%text%" <br /><a href="http://twitter.com/%user_screen_name%/statuses/%id%/">%time%</a>'
	});
	
});

$(function () {
	$('.dropdown').each(function () {
		$(this).parent().eq(0).hover(function () {
			$('.dropdown:eq(0)', this).show();
		}, function () {
			$('.dropdown:eq(0)', this).hide();
		});
	});
});
