jQuery(document).ready(function()
{
	jQuery("#facebook_header").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#facebook_headertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#facebook_headertext").css({"color" : "#939393"});		
	});
	
	jQuery("#facebook_headertext").hover(function()
	{
		jQuery("#facebook_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#facebook_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#facebook_header").click(function()
	{
		window.open("https://www.facebook.com/pages/Femmes-Magazine/145676438787544", "_blank");
	});

	jQuery("#facebook_headertext").click(function()
	{
		window.open("https://www.facebook.com/pages/Femmes-Magazine/145676438787544", "_blank");
	});
	
	jQuery("#twitter_header").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#twitter_headertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#twitter_headertext").css({"color" : "#939393"});		
	});
	
	jQuery("#twitter_headertext").hover(function()
	{
		jQuery("#twitter_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#twitter_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#twitter_header").click(function()
	{
		window.open("http://twitter.com/femmesmag_lu", "_blank");
	});

	jQuery("#twitter_headertext").click(function()
	{
		window.open("http://twitter.com/femmesmag_lu", "_blank");
	});

	jQuery("#delicious_header").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#delicious_headertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#delicious_headertext").css({"color" : "#939393"});		
	});
	
	jQuery("#delicious_headertext").hover(function()
	{
		jQuery("#delicious_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#delicious_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#delicious_header").click(function()
	{
		window.open("http://www.youtube.com/user/femmesmagazine", "_blank");
	});

	jQuery("#delicious_headertext").click(function()
	{
		window.open("http://www.youtube.com/user/femmesmagazine", "_blank");
	});

	
	jQuery("#fluxrss_header").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#fluxrss_headertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#fluxrss_headertext").css({"color" : "#939393"});		
	});
	
	jQuery("#fluxrss_headertext").hover(function()
	{
		jQuery("#fluxrss_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#fluxrss_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#fluxrss_header").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw", "_self");
	});

	jQuery("#fluxrss_headertext").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw", "_self");
	});

	
	jQuery("#newsletter_header").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#newsletter_headertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#newsletter_headertext").css({"color" : "#939393"});		
	});
	
	jQuery("#newsletter_headertext").hover(function()
	{
		jQuery("#newsletter_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#newsletter_header").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});

	jQuery("#newsletter_header").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_chronocontact&chronoformname=abo_newsletter", "_self");
	});

	jQuery("#newsletter_headertext").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_chronocontact&chronoformname=abo_newsletter", "_self");
	});
	
	
	
	jQuery("#facebook_footer").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#facebook_footertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#facebook_footertext").css({"color" : "#939393"});		
	});
	
	jQuery("#facebook_footertext").hover(function()
	{
		jQuery("#facebook_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#facebook_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#facebook_footer").click(function()
	{
		window.open("https://www.facebook.com/pages/Femmes-Magazine/145676438787544", "_blank");
	});

	jQuery("#facebook_footertext").click(function()
	{
		window.open("https://www.facebook.com/pages/Femmes-Magazine/145676438787544", "_blank");
	});
	
	jQuery("#twitter_footer").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#twitter_footertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#twitter_footerext").css({"color" : "#939393"});		
	});
	
	jQuery("#twitter_footertext").hover(function()
	{
		jQuery("#twitter_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#twitter_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#twitter_footer").click(function()
	{
		window.open("http://twitter.com/femmesmag_lu", "_blank");
	});

	jQuery("#twitter_footertext").click(function()
	{
		window.open("http://twitter.com/femmesmag_lu", "_blank");
	});

	jQuery("#delicious_footer").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#delicious_footertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#delicious_footertext").css({"color" : "#939393"});		
	});
	
	jQuery("#delicious_footertext").hover(function()
	{
		jQuery("#delicious_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#delicious_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#delicious_footer").click(function()
	{
		window.open("http://www.youtube.com/user/femmesmagazine", "_blank");
	});

	jQuery("#delicious_footertext").click(function()
	{
		window.open("http://www.youtube.com/user/femmesmagazine", "_blank");
	});

	
	jQuery("#fluxrss_footer").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#fluxrss_footertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#fluxrss_footertext").css({"color" : "#939393"});		
	});
	
	jQuery("#fluxrss_footertext").hover(function()
	{
		jQuery("#fluxrss_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#fluxrss_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});
	
	jQuery("#fluxrss_footer").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw", "_self");
	});

	jQuery("#fluxrss_footertext").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw", "_self");
	});

	
	jQuery("#newsletter_footer").hover(function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery("#newsletter_footertext").css({"color" : "#ffffff"});
	}, function()
	{
		jQuery(this).css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery("#newsletter_footertext").css({"color" : "#939393"});		
	});
	
	jQuery("#newsletter_footertext").hover(function()
	{
		jQuery("#newsletter_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-hover.png')"});
		jQuery(this).css({"color" : "#ffffff"});
	}, function()
	{
		jQuery("#newsletter_footer").css({"background-image" : "url('http://www.femmesmagazine.lu/images/socialnetwork-default.png')"});
		jQuery(this).css({"color" : "#939393"});		
	});

	jQuery("#newsletter_footer").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_chronocontact&chronoformname=abo_newsletter", "_self");
	});

	jQuery("#newsletter_footertext").click(function()
	{
		window.open("http://www.femmesmagazine.lu/index.php?option=com_chronocontact&chronoformname=abo_newsletter", "_self");
	});
	
	
	jQuery(".lof-navigator > li:last-child").find("span").css({"border-right" : "none"});
	
 	jQuery(".ghop-categories > ul > li > strong").css({"font-weight" : "bold"});
 
	jQuery(".menu_container ul.menu li:last-child").css({"background-image" : "none"});	
	jQuery(".menu_container ul.menu li.level1:first-child").css({"display" : "none"});	
	jQuery(".menu_container ul.menu li.level1:nth-child(2)").css({"margin-left" : "-5px"});	

	jQuery(".article_link").hover(function()
	{
		jQuery(this).find(".menu_articletitle").css({"color" : "#65FFFF"});
		jQuery(this).find(".menu_articleimg").css({"border" : "#65FFFF 2px solid"});
		var parentElement = jQuery(this).parent().attr("id").replace("_child","");
		jQuery("#"+parentElement).css({"color" : "#65FFFF"});
	},function()
	{
		jQuery(this).find(".menu_articleimg").css({"border" : "#E7E7E7 2px solid"});
		jQuery(this).find(".menu_articletitle").css({"color" : "#FF0065"});
	});
	
	jQuery(".sub-item").hover(function()
	{
		var innerHt = jQuery(this).next().innerHeight() - 10;
		var mininnerHt = jQuery(this).parent().height();
		jQuery(this).parent().css({"height" : innerHt+"px", "min-height" : mininnerHt+"px"});
	},function(){
		jQuery(this).parent().css({"height" : "auto"});
		//jQuery(this).next().css({"display" : "none"});
		
		});
		
		
		
			//jQuery(".category_link").css({"color" : "#ffffff"});		
		jQuery(".level1").find("a[class=category_link]").css({"color" : "#ffffff", "border-bottom" : "none"});
		jQuery("a[class=category_link]").hover(function()
		{
			jQuery(this).css({"color" : "#65FFFF", "border-top" : "#000000 1px solid"});	
		},function()
		{
			jQuery(this).css({"color" : "#FFFFFF"});	
		});
		
		jQuery(".level1").hover(function()
		{
			jQuery(this).find(".submenu-container").css({"display" : "inline"});
			jQuery(this).find(".submenu-container_right").parent().children(1).css({"min-height" : "0px"});
			var leftHeight = jQuery(this).find(".submenu-container_right").parent().children(0).height()+10;
			jQuery(this).find(".submenu-container_right").parent().children(1).css({"min-height" : leftHeight+"px"});
			jQuery(this).find("a[class!=category_link]").css({"color" : "#ff0065", "border-bottom" : "#ff0065 3px solid"});
			jQuery(".header_bottomright").find("a.level1").css({"border-bottom" : "none"});
			var firstrightChild = jQuery(this).find(".submenu-container").find(".submenu").children(1).find("a").attr("id");
			if (firstrightChild != undefined)
			{
			jQuery("#"+firstrightChild+"_child").css({"display" : "inline"});
			jQuery("#"+firstrightChild).css({"color" : "#65FFFF"});
			}

		}, function()
		{
			jQuery(this).find(".submenu-container").css({"display" : "none"});
			jQuery(this).find("a[id!=active_menu][class!=category_link]").css({"color" : "#000000", "border-bottom" : "none"});
		});
		
		
		jQuery(".submenu-container").hover(function()
		{
			jQuery(this).css({"display" : "inline"});
		}, function()
		{
			
		});
		
		jQuery(".hz-submenu > li").not(":first-child").hover(function()
		{
			jQuery(".article_child").css({"display" : "none"});
			var srcElement = jQuery(this).find("a").attr("id");
			if ( srcElement != undefined)
			{
				var dispElement = jQuery("#"+srcElement+"_child").attr("id");
				jQuery("#"+dispElement).css({"display" : "inline"});
			}
		}, function()
		{
			var srcElement = jQuery(this).find("a").attr("id");
			if ( srcElement != undefined)
			{
				var dispElement = jQuery("#"+srcElement+"_child").attr("id");
		//		jQuery("#"+dispElement).css({"display" : "none"});
			}
			
		});
		
		jQuery(".article_child").hover(function()
		{
			jQuery(this).parent().css({"display" : "inline"});
		}, function()
		{
			//jQuery(this).parent().css({"display" : "none"});
		});
	/* start - for vsig hover */
	jQuery(".test").hover(function()
	{
		//alert(jQuery(this).parent().parent().next().html());
		jQuery("#desc_container").html(jQuery(this).parent().parent().next().html())
	}, function()
	{
		
	});
	
	imgPos = jQuery.inArray(first_img, image_titlelist);
	imgPos = imgPos - 1;
	thumbimgfirst_Pos = imgPos;
	thumbimglast_Pos = imgPos;
	jQuery("#phocagallery_bigimage").attr("src", image_list[imgPos]);		
	jQuery("#phocagallery_bigimage").attr("alt", image_titlelist[imgPos]);			
	jQuery("#phocagallery_desccontainer").html(image_desclist[imgPos]);
/*	if (typeof image_list != undefined)
	{
		if (image_list.length > 0)
		{
			jQuery("#phocagallery_subthumbnailcontainer1 >img").attr("src", 'images/phocagallery/' + image_list[0]);
			thumbimgPos = 1;
		}

		if (image_list.length > 1)
		{
			jQuery("#phocagallery_subthumbnailcontainer2 >img").attr("src", 'images/phocagallery/' + image_list[1]);
			thumbimgPos = 2;
		}
		
		if (image_list.length > 2)
		{
			jQuery("#phocagallery_subthumbnailcontainer3 >img").attr("src", 'images/phocagallery/' + image_list[2]);
			thumbimgPos = 3;
		}
		
		if (image_list.length > 3)
		{
			jQuery("#phocagallery_subthumbnailcontainer4 >img").attr("src", 'images/phocagallery/' + image_list[3]);
			thumbimgPos = 4;
		}
		
		if (image_list.length > 4)
		{
			jQuery("#phocagallery_subthumbnailcontainer5 >img").attr("src", 'images/phocagallery/' + image_list[4]);
			thumbimgPos = 5;
		}
		
		if (image_list.length > 5)
		{
			jQuery("#phocagallery_subthumbnailcontainer6 >img").attr("src", 'images/phocagallery/' + image_list[5]);
			thumbimgPos = 6;
		}
	}*/
	phocagallery_thumbmoveNext();
	jQuery(".phocagallery_subthumbnailcontainer > img").click(function()
	{
		 var img_path = jQuery(this).attr("src");
		jQuery("#phocagallery_bigimage").attr("src", img_path);	
		
		var imagedescPos = jQuery.inArray(jQuery(this).attr("alt"), image_titlelist);
		jQuery("#phocagallery_desccontainer").html(image_desclist[imagedescPos]);
		jQuery("#phocagallery_bigimage").attr("alt", image_titlelist[imagedescPos]);	
		imgPos = imagedescPos;		


	});
	
	jQuery(".thumbnail_img").css({"cursor" : "Pointer"});
	
	jQuery(".thumbnail_img").hover(function()
	{
		var imagedescPos = jQuery.inArray(jQuery(this).attr("alt"), image_titlelist);
		jQuery("#phocagallery_desccontainer").html(image_desclist[imagedescPos]);
		
	},function()
	{
		
	});
	
	jQuery("#phocagallery_bigimage").hover(function()
	{
		var imagedescPos = jQuery.inArray(jQuery(this).attr("alt"), image_titlelist);
		jQuery("#phocagallery_desccontainer").html(image_desclist[imagedescPos]);

	}, function()
	{
		
	});
	
	
	jQuery(".phocagallery_innerbackbutton").click(function()
	{
		/* window.open('index.php?option=com_phocagallery&view=categories', '_self');*/
		window.open('http://www.femmesmagazine.lu/actu/albums-photo', '_self');
	});
	
	jQuery(".lof-buttons-control a:nth-child(1)").html("<");
	jQuery(".lof-buttons-control a:nth-child(2)").html(">");
	
	/*jQuery(".header_bottomright").find("a.level1").hover(function()
	{
		$(this).css({"border-bottom" : "none"});
	},function()
	{
				$(this).css({"border-bottom" : "none"});
	});*/
	
 });
 
 function phocagallery_thumbmoveNext()
 {
	for (var iLoop = 1; iLoop <= 6; iLoop++)
	{
		
		thumbimglast_Pos = thumbimglast_Pos + 1;
		if (thumbimglast_Pos >= image_list.length)
		thumbimglast_Pos = 0;		

		jQuery("#phocagallery_subthumbnailcontainer" + iLoop + " >img").attr("src", image_list[thumbimglast_Pos]);
		jQuery("#phocagallery_subthumbnailcontainer" + iLoop + " >img").attr("alt", image_titlelist[thumbimglast_Pos]);


		if (iLoop == 1)
		thumbimgfirst_Pos = thumbimglast_Pos;

			
	}
	
	jQuery("#phocagallery_bigimage").attr("src", jQuery("#phocagallery_subthumbnailcontainer1 > img").attr("src"));			
	imgPos = thumbimgfirst_Pos;
	jQuery("#phocagallery_bigimage").attr("alt", image_titlelist[imgPos]);			
	

 }
 
 function phocagallery_thumbmovePrev()
 {
 	for (var iLoop = 6; iLoop >= 1; iLoop--)
	{
		thumbimgfirst_Pos = thumbimgfirst_Pos - 1;
		if (thumbimgfirst_Pos < 0)
		thumbimgfirst_Pos = image_list.length-1;

		jQuery("#phocagallery_subthumbnailcontainer" + iLoop + " >img").attr("src", image_list[thumbimgfirst_Pos]);
		jQuery("#phocagallery_subthumbnailcontainer" + iLoop + " >img").attr("alt", image_titlelist[thumbimgfirst_Pos]);

		
		if (iLoop == 6)
		thumbimglast_Pos = thumbimgfirst_Pos;
		
	}
	jQuery("#phocagallery_bigimage").attr("src", jQuery("#phocagallery_subthumbnailcontainer1 > img").attr("src"));			
	imgPos = thumbimgfirst_Pos;
	jQuery("#phocagallery_bigimage").attr("alt", image_titlelist[imgPos]);			
 }
 
 function phocagallery_imgmoveNext()
 {
	imgPos = imgPos + 1;
	if (imgPos >= image_list.length)
	imgPos = 0;
	
	jQuery("#phocagallery_bigimage").attr("src", image_list[imgPos]);			
	jQuery("#phocagallery_bigimage").attr("alt", image_titlelist[imgPos]);	
	var imagedescPos = jQuery.inArray(jQuery("#phocagallery_bigimage").attr("alt"), image_titlelist);
	jQuery("#phocagallery_desccontainer").html(image_desclist[imagedescPos]);

 }
 
 function phocagallery_imgmovePrev()
 {
	imgPos = imgPos - 1;
	if (imgPos < 0)
	imgPos = image_list.length-1;
	
	jQuery("#phocagallery_bigimage").attr("src", image_list[imgPos]);			
	jQuery("#phocagallery_bigimage").attr("alt", image_titlelist[imgPos]);			
	var imagedescPos = jQuery.inArray(jQuery("#phocagallery_bigimage").attr("alt"), image_titlelist);
	jQuery("#phocagallery_desccontainer").html(image_desclist[imagedescPos]);

 }


