		function insertRow(data,table,remote){		$.post("/scripts/php/process.php",{insertRow:"1",data:data,table:table,remote:remote}, function(d){			alert(d);		});	}			function updateField(id,refID,table,field,val){				$.post("/scripts/php/process.php",{updateField : "1", id:id, refID:refID,table:table,field:field,val:val}, function(data){			//alert(id+" "+table+" "+val+" "+data);		});	}		function updateFieldNEW(id,refID,table,field,val,remote){					$.post("/scripts/php/process.php",{updateFieldNEW : "1", id:id, refID:refID,table:table,field:field,val:val,remote:remote}, function(data){			//alert(data);		});	}		 jQuery.fn.bigGallery = function(opts) { 		opts = jQuery.extend({			selectorClass:'.bigGalleryImage', 			startWith:0,			fadeOutSpeed	:50,			fadeInSpeed	:350,			callback:function(){return false;}					},opts||{});	 		 	var newFrame=0;	 		var totalFrames = $(opts.selectorClass).size(); 		var currentFrame = $(opts.startWith); 		 		$('div.bigGallery span.stats').text(totalFrames); 						$(opts.selectorClass).each(function(){			var galleryImage = '<div class="bigGalleryFrame"><img src="'+$(this).attr("lang")+'" alt="'+$(this).attr("alt")+'" title="'+$(this).attr("title")+'" /></div>';						$('div.bigGallery div.images').append(galleryImage);				});				$('div.bigGalleryFrame').hide();		$(opts.selectorClass).each(function(index){						$(this).bind('click', function() {				showImage(index);				$('div.bigGallery').fadeIn(100);				$('div.bigGallery').css("top",$(window).scrollTop());		 				 		//$("body").css("overflow", "hidden");		 		$("html").css("overflow", "hidden");				$('div.bigGallery').css("overflow",'auto');		 		return false;			}); 		}) 		 		function showImage(image){ //			$('div.bigGalleryFrame').eq(currentFrame).fadeOut(opts.fadeOutSpeed); 			$('div.bigGalleryFrame').eq(currentFrame).hide(); 			currentFrame = image; 			$('div.bigGalleryFrame').eq(currentFrame).fadeIn(opts.fadeInSpeed);  			updateDisplay($('div.bigGalleryFrame').eq(currentFrame).children('img')); 			 		}		$('span.next, div.bigGalleryFrame').click(function(){			newFrame=currentFrame+1;			(newFrame==totalFrames ? newFrame=0 : null)			showImage(newFrame);		})					$('span.previous').click(function(){			newFrame=currentFrame-1;			(newFrame<0 ? newFrame=totalFrames-1 : null)			showImage(newFrame);		})				$('span.close').click(function(){			closeBigGallery()		})				$(document).keyup(function(e) {		  if (e.keyCode == 27) { closeBigGallery() }   // esc		});				function closeBigGallery(){			$('div.bigGalleryFrame').hide();			$('div.bigGallery').fadeOut(50);			$("html").css("overflow", "auto");		}				function updateDisplay(pageInfoFrom){			$('div.bigGallery span.stats').text((currentFrame+1)+"/"+totalFrames) 			$('h3.title').text($(pageInfoFrom).attr("title"));			$('h4.subTitle').text($(pageInfoFrom).attr("alt"));		}				return false;		 	};$(document).ready(function(){		// png fix	$(document).pngFix();	// end png fix		// default input text	$('input[type=text]').focus(function(){     	if($(this).val() == $(this).attr('defaultValue')) {      		$(this).val('');    	}  	});    	$('input[type=text]').blur(function(){    	if($(this).val() == '') {      		$(this).val($(this).attr('defaultValue'));    	}  	}); 	// end default input text 		// search	$('#live-search input[name="q"]').keyup(function(){		var type = $('select[name="type"]').val();		if(!type) {			$('select[name="type"] option').each(function(){				type += $(this).val()+"/";			})		}				$("#list").load("/scripts/php/search.php", {q: $(this).val(), type: type, order: $("#order").val()});	})		$('#live-search form').bind("submit", function() {		return false;								});		$('#live-search select[name="type"]').change(function(){		var type = $('select[name="type"]').val();		if(!type) {			$('select[name="type"] option').each(function(){				type += $(this).val()+"/";			})		}				$("#list").load("/scripts/php/search.php", {q: $('#live-search input[name="q"]').val(), type: type, order: $("#order").val()});	})				// end search		// list column resize 	if($(document).width() > 1260) {    	//$("#list").width(600);    }	    	$(window).bind('resize', function() {	    if($(document).width() > 1260) {	    	//$("#list").width(600);	    } else {	    	$("#list").width(300);	    }	});	// end list column resize 		// add links to images	$("#list a.link").each(function(){		var id = $(this).attr("id").split("_");		var href = $(this).attr("href");		$("#img_"+id[1]).attr("href", href);	});	// end add links to images		// login	$("#login, a.openLogin").click(function(){		$(".login").show();		return false;	});/*	$("a.userEdit").click(function(){		$(".login").show();				return false;	});*/		$("#newsletterSignup").click(function(){		$(".newsletterSignup").show();		return false;	});			$(".closeLogin").click(function(){		$(".login, .newsletterSignup").hide();		return false;	});	// end login		});
