// Wordplay Media Jquery Master Document

// Main nav colour hover effect

// a tags
/* plugin */
//jQuery.fn.dwFadingLinks = function(settings) {
//	settings = jQuery.extend({
//		color: '#474747',
//		duration: 300
//	}, settings);
//	return this.each(function() {
//		var original = $(this).css('color');
//		$(this).mouseover(function() { $(this).animate({ color: settings.color },settings.duration); });
//		$(this).mouseout(function() { $(this).animate({ color: original },settings.duration); });
//	});
//};
//
///* usage */
//$(document).ready(function() {
//	$('#nav .block .blocky-menu a').dwFadingLinks({
//		color: '#ffffff',
//		duration: 500
//	});
//});

// li tags


//$(function() {
//		$("li").stop(true,true).hover(function() {
//			$(".menu-1256").toggleClass('testchange', 300);
//		});
//});

//$(function() {
//		$("li").mouseout(function() {
//			$(".menu-1256").removeClass('testchange');
//		});
//});

//$(function() {
//	$("li").hover(function() {
//   		$("li").stop(true,true).toggleClass('testchange', 500);
//	});
//});

//$(function() {
//	$('.menu-1256').bind('mouseover mouseout', function() {
// 		$(this).toggleClass('testchange', 500);
//	});
//});



//$(document).ready(function(){
//    $("li").hover(function() {
//    	$(this).animate({ backgroundColor: "#68BFEF" }, 500);
//	},function() {
//    	$(this).animate({ opacity: 0 }, 300);
//	});
//});
//$(document).ready(function(){
//	$("li a").hover(function() {
//		$(this).animate({ opacity: 1 }, 300);
//	},function() {
//    	$(this).animate({ opacity: 1 }, 300);
//	});
//});

// Main logo

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.logo-normal').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .logo-hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .logo-hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.logo-normal > .logo-hover').empty();
})

// Footer logo

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.footer-logo').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .hover-this', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .hover-this', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.footer-logo > .hover-this').empty();
})
	
// Image border hover

          $(document).ready(function() {
            $('.blog-image img').hover(
              function () {
                $(this).animate({borderBottomColor:'#eaeaea', borderLeftColor:'#eaeaea', borderRightColor:'#eaeaea', borderTopColor:'#eaeaea'}, {queue:false,duration:500});
              }, function () {
                $(this).animate({borderBottomColor:'#D4D4D4', borderLeftColor:'#D4D4D4', borderRightColor:'#D4D4D4', borderTopColor:'#D4D4D4'}, {queue:false,duration:500});
              });
          });
		  

          $(document).ready(function() {
            $('#right-col .latest-post .view-content .views-field-field-blog-image-fid img').hover(
              function () {
                $(this).animate({borderBottomColor:'#eaeaea', borderLeftColor:'#eaeaea', borderRightColor:'#eaeaea', borderTopColor:'#eaeaea'}, {queue:false,duration:500});
              }, function () {
                $(this).animate({borderBottomColor:'#D4D4D4', borderLeftColor:'#D4D4D4', borderRightColor:'#D4D4D4', borderTopColor:'#D4D4D4'}, {queue:false,duration:500});
              });
          });
		  
// Footer links

          $(document).ready(function() {
            $('#fl-text .view-content a').hover(
              function () {
                $(this).animate({color:'#00aeef'}, {queue:false,duration:600});
              }, function () {
                $(this).animate({color:'#898989'}, {queue:false,duration:600});
              });
          }); 
		  
// Feature boxes Read More links

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.rm-normal').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .rm-hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .rm-hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.rm-normal > .rm-hover').empty();
})

// View Project button

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.vp-normal').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .vp-hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .vp-hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.vp-normal > .vp-hover').empty();
})

// Read More button

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.brm-normal').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .brm-hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .brm-hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.brm-normal > .brm-hover').empty();
})

// Project View button

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.pv-normal').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .pv-hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .pv-hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.pv-normal > .pv-hover').empty();
})

// View Website

$(document).ready(function() {
	// find the div.fade elements and hook the hover event
	$('.portfolio-site-link a').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> .w-hover', this);
 
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(500, 1);
		} else {
			fade.fadeIn(500);
		}
	}, function () {
		var fade = $('> .w-hover', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
		} else {
			fade.fadeOut(500);
		}
	});
 
	// get rid of the text
	$('.portfolio-site-link a > .w-hover').empty();
})