/*----------------------------------------------------------------
[jquery.topProductAnimate.js]

Project					:		Wildcraft
Version					:		1.1
Last change				:		10/16/09 []
Author					:		Ranjoy Sen
Primary use				:		Plugin for window scrall animation
Dependency 				:		jquery-1.3.2.min_.js,
								jquery.scrollTo.js
------------------------------------------------------------------*/
(
	function($)
	{  
		$.fn.scrollWindowHorizontal = function() 
		{  
			return this.each
			(
				function() 
				{  
					try{
					$(this)
						.click
						(
							function()
							{
								scrollTop = $(window).scrollTop();
								$(".fun_wc_warranty_link")
									.each
									(
										function(i, keep_fun_wc_warranty_link_on_top)
										{ // loop through article headings
											fun_wc_warranty_link_top = $(keep_fun_wc_warranty_link_on_top).offset().top; // get article heading top
											//alert(fun_wc_warranty_link_top);
											 if (scrollTop < fun_wc_warranty_link_top) 
											 { // compare if document is below heading
												$.scrollTo(fun_wc_warranty_link_top, 800); // scroll to in .8 of a second
												return false; // exit function
											}
										}
									);
							}
						);
					}
					catch(e)
					{
						alert(e);	
					}
					
				}
			);  
 		};  
 	}
 )(jQuery);  
