// JavaScript Document
$(function(){
	$("a.card, a.prospectus, a.sign, a.popup").fancybox({ 'titlePosition': 'inside' });
	$("a.pagePopup").fancybox({'type': 'iframe'})
	
	$(".linkIndic").each(function(){
		$(this).click(function(){
			$link = $(this).attr("href");
			window.open("http://www.linkws.com/webservices/li/link_indic.jsp?userProductID=216422&url="+$link,'Link_Indic','height=335,width=402,scrolling=no');
			return false;
		})
	})
	
	$("a[href]")
	.filter(function(){
		return (location.hostname != this.hostname);
	})
	.each(function(){
		$(this).attr("target", "_blank")
	});
})

String.prototype.transform = function(inCase, url) {
	var myArr = this.split(" ");
	for(i=0; i<myArr.length; i++) {
		if(inCase(myArr[i])) {
			startSlice = myArr[i].indexOf(">", 0)+1;
			endSlice = myArr[i].indexOf("<", startSlice);
			openTag = myArr[i].slice(0, startSlice);
			tmpStr0 = myArr[i].slice(startSlice, endSlice);
			closeTag = myArr[i].slice(endSlice, myArr[i].length);
			tmpStr = url(myArr[i]) || null;
			myArr[i] = ""+tmpStr;
			tmpStr = "";
		}
	}
	return myArr.join(" ");
}

function lockIt() {
	return false;
}

var evt = (document||window);

evt.oncontextmenu = lockIt;
evt.oncopy = lockIt;
evt.ondragdrop = lockIt
