/* ======= CONTROL RSS FEEDS ========= */
		function LoadNewsFeed() {
			var feeds = [{title: 'FORD NEWS',url: 'http://media.ford.com/news/rss.xml'}];
			var options = {
				stacked : false,
				horizontal : false,
				title : ""
			}
			new GFdynamicFeedControl(feeds, 'feed-control-ford', options);
		}
		
		function LoadBlogFeed() {
			var feeds = [{title: 'Ford Motor Company Newsroom',url: 'http://media.ford.com/rss.cfm?section_id=15'}];
			var options = {
				stacked : false,
				horizontal : false,
				title : ""
			}
			new GFdynamicFeedControl(feeds, 'feed-control-blog', options);
		}
		// Load the feeds API and set the onload callback.
		google.load('feeds', '1');
		google.setOnLoadCallback(LoadBlogFeed);
		google.setOnLoadCallback(LoadNewsFeed);


/* ======== SLIDESHOW ACTION ======== */
/*		function slideSwitch() {
			 var $active = $('#slidesBox div.active');
			 if ( $active.length == 0 ) $active = $('#slidesBox div:last');
			 var $next =  $active.next().length ? $active.next()
				  : $('#slidesBox div:first');
		
			 $active.addClass('last-active');
		
			 $next.css({opacity: 0.0})
				  .addClass('active')
				  .animate({opacity: 1}, 750, function() {
						$active.removeClass('active last-active');
						changeLink();
				  });
		}
		function startShow(){
			setInterval( "slideSwitch()", 5000 );
			changeLink();
		}
		function changeLink(){
			 var href = $("#slidesBox div.active a").attr("href");
			 $(".slidesCover a").attr("href",href);
			 if (href == "/facebook"){
				 $(".slidesCover a").attr("target","_blank");
			 } else {
				 $(".slidesCover a").attr("target","_self");
			 }
		}
		$(function() {
			setTimeout("startShow()", 1000);
			setTimeout("slideSwitch()", 1000);
		});
*/

		function changeLink(){
			 var href = $("#slidesBox").find('.activeEl').find("a").attr("href");
			 var cover = $(".slidesCover").find("a"); 
			 $(cover).attr("href",href);
			 if (href == "/facebook"){
				 $(cover).attr("target","_blank");
			 } else {
				 $(cover).attr("target","_self");
			 }
		}

/* ========= BUTTONS HOVER ACTIONS =========== */
		$(document).ready(function(){
			 $('.btnRight').hover(function(){
				$(".cover", this).stop().fadeTo(100, 0.0, function(){
					  $(this).hide();
				});
			  }, function() {
				$(".cover", this).stop().show(0, function(){
					  $(this).fadeTo(100, 1.0);
				});
			  });

				var green = "#74B221";
				var blue = "#255A88";
				$(".socialBox").children().hover(function() {
					$(this).parent().css('background',green); // Changes box background color to light green
				}, function() {
					$(this).parent().css('background',blue);  // Changes box background back to blue
				});
				$(".social").hover(function() {
					$(this).css('background',green); // Changes box background color to light green
				}, function() {
					$(this).css('background',blue);  // Changes box background back to blue
				});
				
				
				$('ul#slidesBox').hpSlideshow({
					speed: 1000,
					timeout: 5000,
					type: 'sequence',
					containerheight: '364px',
					containerwidth: '614px'
				});
				
			$(".slidesCover").mouseenter(changeLink);
			

		});









