jQuery(document).ready(function($) {

	$('#ft img').addClass('js');

	$("a[rel='external']").live("click", function(){
		window.open($(this).attr("href"));
		return false;
	})	
	$('#menu-item-179').after('<li><a href="http://www.purple-agency.com/" rel="external">Designed & Developed by The Purple Agency</a>');
	$("a[rel='external']").attr("title", "Link opens new window");
	$('#main .page_item.page-item-111').after('<li class="page_item page-item-11"><a title="Property to Let" href="/residential">Property to Let</a><ul class="children"><li class="page_item page-item-16"><a title="Commercial" href="/commercial">Commercial</a></li><li class="page_item page-item-13"><a title="Residential" href="/residential">Residential</a></li></ul></li>');
	
	$('ul#menu-primary-menu').superfish();
	
	$('#footer .your-email input').attr('value', 'Your email address');
	
	swapValue = [];
	$(".your-email input").each(function(i){
	   swapValue[i] = $(this).val();
	   $(this).focus(function(){
	      if ($(this).val() == swapValue[i]) {
	         $(this).val("");
	      }
	      $(this).addClass("focus");
	   }).blur(function(){
	      if ($.trim($(this).val()) == "") {
	         $(this).val(swapValue[i]);
		 $(this).removeClass("focus");
	      }
	   });
	});		
	
	 // Select Internet Explorer 7
    if (jQuery.browser.msie && jQuery.browser.version == 7) {
    	$(".wpcf7-form").addClass('ie7');
    };
    
	$('#ft').jqFancyTransitions({
		effect: 'random top',
		strips:12,
		navigation: true,
		width:929,
		height:290,
		delay: 6000,
		stripDelay: 60, // delay beetwen strips in ms
		position: 'top',
		direction: 'fountainAlternate' // left, right, alternate, random, fountain, fountainAlternate
	});

	
	$('.scrollPage').click(function() {
		   var elementClicked = $(this).attr("href");
		   var destination = $(elementClicked).offset().top;
		   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
		   return false;
		});	
	
	
	});





