$(document).ready(function(){

	/* MONCUR LOGO ANIM */
	$("#moncur a").hover(function() {
		$(this).prev("span").animate({opacity: "show", left: "-185"}, "slow");
	}, function() {
		$(this).prev("span").animate({opacity: "hide"}, "fast");
	});
	
	/* EXTERNAL WINDOWS */
	$(function(){
	    $('a.external').click(function(){
		   window.open(this.href);
		   return false;
	    });
	});
	
	/* FAQ SLIDER */
	$("dl.slide dd").hide(); //hide 
	$("dl.slide dt").click(function(){ //toggle 
		$(this).next("dd").slideToggle(500)
		return false;
	});
	
	/* BLOG ARCHIVES SLIDER */
	$("body.archives div.slide").hide(); //hide 
	$("body.archives h4").click(function(){ //toggle 
		$(this).next("div.slide").slideToggle(500)
		return false;
	});
	
	/* MICROSITES SLIDER */
	$("#microsites div").hide(); //hide
	$("#microsites h4.slide").click(function(){ //toggle 
		$(this).next("#microsites div").slideToggle(500)
		return false;
	});
	
	/* PARTNERS SLIDER */
	$("#partners ul").hide(); //hide
	$("#partners h4.slide").click(function(){ //toggle 
		$(this).next("#partners ul").slideToggle(500)
		return false;
	});
	
	/* RELATED SITES SLIDER */
	$("#related div").hide(); //hide 
	$("#related h4.slide").click(function(){ //toggle 
		$(this).next("#related div").slideToggle(500)
		return false;
	});
	
	
});


$(document).bind("contextmenu",function(e){
	window.alert("Content Copyright Plymouth Auctioneering and/or Park West Gallery");
	return false;
});

var newwindow;
function popup(url)
{
	newwindow=window.open(url,'name','height=700,width=760,resizable=yes,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

var newwindow2;
function popup2(url)
{
	newwindow2=window.open(url,'name','height=240,width=320,resizable=no,scrollbars=no');
	if (window.focus) {newwindow2.focus()}
}


function disableSelection(target){ 
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}
//Sample usages
//disableSelection(document.body) //Disable text selection on entire body
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"



function initPopupLinks()
{
  if (!document.getElementsByTagName) return true;
  var pageLinks = document.getElementsByTagName("a");
  for (var i = 0; i < pageLinks.length; i++) 
  {
    if (((pageLinks[i].className != null) && 
         (pageLinks[i].className != "")) ||
        ((pageLinks[i].parentNode.className != null) && 
         (pageLinks[i].parentNode.className != "")))
    {
      var linkClass = " " + pageLinks[i].className + " ";
      if ((linkClass == "  ") && (pageLinks[i].parentNode.className != ""))
      {
        linkClass = " " + pageLinks[i].parentNode.className + " ";
      }
      for (var theKey in popupLinkConfig) 
      {
        if (linkClass.indexOf(" " + theKey + " ") > -1)
        {
          if ((pageLinks[i].target == "") || (pageLinks[i].target == null))
          {
            pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey;
          }
          pageLinks[i].settings = popupLinkConfig[theKey][1];
          pageLinks[i].onclick = popUp;
        }
      }
    }
  }
  return true;
}

function popUp()
{
  newWin = window.open(this.href, this.target, this.settings);
  newWin.focus();
  return false;
} 

var popupLinkConfig = new Array;
// Delete/copy/modify the following lines to configure your popup windows.
popupLinkConfig["vidpopup"] = new Array ( "", "width=320,height=240,scrollbar=no,menubar=no");





