$(function(){
$(this).bind("contextmenu", function(e) {
e.preventDefault();
});
$.extend($.fn.disableTextSelect = function() {
return this.each(function(){
if($.browser.mozilla){
$(this).css('MozUserSelect','none');
}else if($.browser.msie){
$(this).bind('selectstart',function(){return false;});
}else{
$(this).mousedown(function(){return false;});
}
});
});
$('#content').disableTextSelect();
// Load Hidden Member Forms
$.ajax({
url: "vedacms/functions/snippets/member.forms.inc2.php",
async: false,
success: function (html) {
$("body").append(html);
}
});
$('.memberform').each(function(){
var id = $(this).attr('id');
var options = {
target: '#'+id+'-msg',
beforeSubmit: function() {
return $('#'+id).validate().form();
},
success : function (response) {
if (response.indexOf("SUCCESS") >= 0) {
$('#'+id+'-msg').append('
Click here if the page doesn\'t refresh after 2 seconds.');
$('#'+id+'-msg').fadeIn('slow');
$('.memberform').css({'display':'none'});
window.setTimeout(function(){location.reload()},2000)
}
else
{
$('#'+id+'-msg').fadeIn('slow');
}
}
};
if ($('#'+id).length ) {
$('#'+id).ajaxForm(options);
}
});
// Launch member popups
$('body').on("click",".userbtn", function(e){
e.preventDefault();
var form = $(this).attr('title');
$('.userform').css({'display':'none'});
$('.dim').css({'display':'block'});
$('#'+form).fadeIn(500);
//return false;
});
// Close member popup
$(".close").click(function(){
$(".userform").css({'display':'none'});
$('.dim').css({'display':'none'});
});
// Center member popups on screen
$(window).resize(function (){
$('.userform').each(function(){
var id = $(this).attr('id');
$('#'+id).css('position', 'fixed').css({
left: ($(window).width() - $('#'+id).width()) / 2,
top: ($(window).height() - $('#'+id).height()) / 2
});
});
});
$(window).resize();
// iFrame auto-height
//$('iframe').iframeAutoHeight({debug: true});
//iLightbox Popups
$('a.popbox').each(function(){
$(this).iLightBox();
});
});
// ie-placeholder.min.js
$(function() { var input=document.createElement("input");if("placeholder"in input==false){$("[placeholder]").focus(function(){var e=$(this);if(e.val()==e.attr("placeholder")){e.val("").removeClass("placeholder");if(e.hasClass("password")){e.removeClass("password");this.type="password"}}}).blur(function(){var e=$(this);if(e.val()==""||e.val()==e.attr("placeholder")){if(this.type=="password"){e.addClass("password");this.type="text"}e.addClass("placeholder").val(e.attr("placeholder"))}}).blur().parents("form").submit(function(){$(this).find("[placeholder]").each(function(){var e=$(this);if(e.val()==e.attr("placeholder"))e.val("")})})} });
// Tooltips
var targets=$("[class~=tooltip]"),target=false,tooltip=false,title=false;targets.bind("mouseenter",function(){target=$(this);tip=target.attr("title");tooltip=$('