/*
	extra.js 
	(c) 2010 Nuno Loureiro [Monstro Network ®]
*/

$(function(){

    var $el, leftPos, newWidth,
        $mainNav = $("#header_links");
    
    $mainNav.append("<li id='magic-line'></li>");
    
    var $magicLine = $("#magic-line");

	$magicLine
	.width($(".current_page_item").width())
	.css("left", $(".current_page_item a").position().left)
	.data("origLeft", $magicLine.position().left)
	.data("origWidth", $magicLine.width());

	$("#header_links li").find("a").hover(function() {
        $el = $(this);
        leftPos = $el.position().left;
        newWidth = $el.parent().width();
        
        $magicLine.stop().animate({
            left: leftPos,
            width: newWidth
        });
    }, function() {
        $magicLine.stop().animate({
            left: $magicLine.data("origLeft"),
            width: $magicLine.data("origWidth")
        });    
    });
});

/******************************************************************/
/*	Gallery Image Hover 									      */
/******************************************************************/

$(document).ready(function () {

	
$('.imgonhover').hover(
		
		//Mouseover, fadeIn the hidden hover class	
		function() {
		$(this).children('div').css('display', 'block'); // FIX IE BUG	
		$(this).children('div').fadeTo("fast",0.6);
				
		}, 
	
		//Mouseout, fadeOut the hover class
		function() {
		$(this).children('div').fadeTo("fast",0, function() {
		});
		
		
	});


});
/******************************************************************/
/*	Gallery Image Hover *END*								      */
/******************************************************************/

/******************************************************************/
/*	Marks Image Hover 									      */
/******************************************************************/

$(document).ready(function () {

$('.mark').css('display', 'block'); // FIX IE BUG
$('.mark').fadeTo("fast",1);
	
$('.mark').hover(

		//Mouseover, fadeIn the hidden hover class	
		function() {
		$(this).css('display', 'block'); // FIX IE BUG	
		$(this).fadeTo("fast",0.6);
		}, 
	
		//Mouseout, fadeOut the hover class
		function() {
		$(this).fadeTo("fast",1, function() {
		});
		
		
	});


});
/******************************************************************/
/*	Marks Image Hover *END*								      */
/******************************************************************/
