$(document).ready(function() {
////////////////// START JQUERY /////////////////////////////

// If not in Kentico Edit mode
var editmode = true;
if ($('body').hasClass('EditMode') != true && $('body').hasClass('DesignMode ') != true){
// If not in Kentico Edit mode

// Set page ID varible
var pageID = $('body').attr('id');
// Add class to body if jQuery has loaded
$('body').addClass('jQuery');

// Add span to blue button
$('a.blueBtn').append('<span>&gt;</span>');
// Add span to simple SP
$('div.signpostSimple .image').prepend('<span>&gt;</span>');

$("#productList .thumbnail:nth-child(2n)").addClass('margin');

// Add value to search box
$("#siteSearch input.textBox").attr('value','Insert Keywords(s)');

/////////////////////////////
/**
* The following variables may be adjusted
*/
var active_color = '#b5c8ec'; // Colour of user provided text
var inactive_color = '#b5c8ec'; // Colour of default text

/**
* No need to modify anything below this line
*/

 // $(".inputSH .TextInput").css("color", inactive_color);
  $("#siteSearch input.textBox").addClass("inactive_color");
  var default_values = new Array();
  $("#siteSearch input.textBox").focus(function() {
    if (!default_values[this.id]) {
      default_values[this.id] = this.value;
    }
    if (this.value == default_values[this.id]) {
      this.value = '';
      //this.style.color = active_color;
	  $(this).toggleClass("inactive_color");
    }
    $(this).blur(function() {
      if (this.value == '') {
        //this.style.color = inactive_color;
		$(this).toggleClass("inactive_color");
        this.value = default_values[this.id];
      }
    });
  });
////////////////////////////////////////////////////

$("#ipad a").hover(
	function(){
		 $(this).find("span.up").stop(true, true).fadeOut("fast");
		 $(this).find("span.over").stop(true, true).fadeIn("fast");
		},
	function(){
		 $(this).find("span.up").stop(true, true).fadeIn("fast");
		 $(this).find("span.over").stop(true, true).fadeOut("fast");
		}
	);
	
$("#ipad a").mouseup(function(){
		 $(this).find("span.up").css("display","none");
		 $(this).find("span.over").css("display","block");
		 $(this).find("span.active").css("display","none");
		 window.location = $(this).attr("href");
    }).mousedown(function(){
		 $(this).find("span.up").css("display","none");
		 $(this).find("span.over").css("display","none");
		 $(this).find("span.active").css("display","block");
    });
	
	/*
$("#siteSearch input.lightBlueBtn").mouseup(function(){
	
	var inputVal = $("#plc_lt_zoneTopRight_SearchBox_txtWord").val();
	
	if (inputVal == "Insert Keywords(s)")
		{
			alert("enter some text...");
		}
		
	});
*/
$("#siteSearch input.lightBlueBtn").attr('disabled','disabled');


$("#siteSearch input.textBox").blur(function() {
	
	if (this.value != 'Insert Keywords(s)')
	{
	$("#siteSearch input.lightBlueBtn").removeAttr('disabled');	
		}
	
	});
/**/

$("#mainMenu li").hover(
	function(){
		 $(this).toggleClass('over');
		},
	function(){
		 $(this).toggleClass('over');
		}
	);




	



	
	
	
	
	
	
	
	
	
	
	
	
// End If Kentico mode
};
////////////////// END JQUERY /////////////////////////////
});

