function setLocation(url){
	window.location.href = url;
}

$.validator.setDefaults({
	highlight: function(input) { $(input).addClass("error"); },
	unhighlight: function(input) { $(input).removeClass("error"); },
    errorClass: "form-error",
	validClass: "form-valid",
	errorElement: "div",
    errorObject: ''
});

$(document).ready(function() {	
	$('.autoclear').click(
	function() {
	if (this.value == this.defaultValue) {
	this.value = '';
	}
	}
	);
	$('.autoclear').blur(
	function() {
	if (this.value == '') {
	this.value = this.defaultValue;
	}
	}
	);
	
});

$(document).ready(function() {

    $('.slider').cycle({
		fx: 'fade' 
	});
	$("a[rel^='prettyPhoto']").prettyPhoto();
	$(".loginform input, .newsletterform input").labelify({ text: "label" });
	
	
	var message="Sorry, right-click has been disabled";

	function clickIE() {if (document.all) {(message);return false;}}
	function clickNS(e) {if
	(document.layers||(document.getElementById&&!document.all)) {
	if (e.which==2||e.which==3) {(message);return false;}}}
	if (document.layers)
	{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
	else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
	document.oncontextmenu=new Function("return false") 
	
	$("form input").keypress(function (e) {
		if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
			$(this).parents("form").find('.submit').click();
			$(this).parents("form").find('.search_btn').click();
			return false;
		} else {
			return true;
		}
	})
});





