
jQuery.noConflict()

//** The following applies the magnify effect to images with class="magnify" and optional "data-magnifyby" and "data-magnifyduration" attrs
//** It also looks for links with attr rel="magnify[targetimageid]" and makes them togglers for that image

jQuery(document).ready(function($){
	var $targets=jQuery('.magnify')
	$targets.each(function(i){
		var $target=jQuery(this)
		var options={}
		if ($target.attr('data-magnifyby'))
			options.magnifyby=parseFloat($target.attr('data-magnifyby'))
		if ($target.attr('data-magnifyduration'))
			options.duration=parseInt($target.attr('data-magnifyduration'))
		$target.imageMagnifier(options)
	})
	var $triggers=jQuery('a[rel^="magnify["]')
	$triggers.each(function(i){
		var $trigger=jQuery(this)
		var targetid=$trigger.attr('rel').match(/\[.+\]/)[0].replace(/[\[\]']/g, '') //parse 'id' from rel='magnify[id]'
		$trigger.data('magnifyimageid', targetid)
		$trigger.click(function(e){
			jQuery('#'+jQuery(this).data('magnifyimageid')).trigger('click.magnify')
			e.preventDefault()
		})
	})
	//	initpage();
});

// MENU SECTION
jQuery(" #nav li a img ").hover(function() {
									
	var nav_id = jQuery(this).attr("id");
	
	jQuery(this).attr("src",currentPath+"images/topnav/"+nav_id+"-on.gif");
		}, function() {
	var nav_id = jQuery(this).attr("id");
	jQuery(this).attr("src",currentPath+"images/topnav/"+nav_id+".gif");
});
	
jQuery(" #nav ul ").css({display: "none"}); // Opera Fix
jQuery(" #nav li").hover(function(){
		jQuery(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		jQuery(this).find('ul:first').css({visibility: "hidden"});
		});

// LEFT NAV 3-DOT INDICATOR
jQuery("#lnav li a").hover(function(){
		jQuery(this).children("img").attr("src", currentPath+"images/lnav-dot-on.jpg");
		    }, function() {
				jQuery(this).children("img").attr("src", currentPath+"images/spacer.gif");
	});
jQuery("#lnav li#lnavsel a").hover(function(){
		jQuery(this).children("img").attr("src", currentPath+"images/lnav-dot-on.jpg");
		    }, function() {
				jQuery(this).children("img").attr("src", currentPath+"images/lnav-dot.jpg");
	});


function webmaster_addr() {
var kode=
"kode=\"nrgh@%rnhg_%@nrgh_%__u@kq(jqCju(kxb~Cnm}l\\000vrwn7+{j}q1nEF)+{joue"+
"xv\\000rk}jC}n{vw|}nnI7nn{ex)wr}u+F}+}+n\\000ekejG}n{vw|}nnI7nn{Exjw+}D8AG"+
"(2~b-CA-ul.xCoA6Bouqkjr4tkzmAn1o/1i\\001qCju4knixguIkjzGo.3/A9loi.6Bi/C187"+
"A>1~YCxzto4mxlsunIxguIkji.__/q__333juCk~(A~C--Alux.oC6AoB.qujk4rktmzn37/Ao"+
"1C8/\\001~1Cqujk4ingxGz.o17/1qujk4ingxGz.o____3/q3j3Cu1ko~q.jB4ukkmrntqzjE"+
"4unkxizgqGj.4ukkmrnt7z@3-/A->/_%__{@**>iru+l@3>l?nrgh1ohqjwk>l..,~f@nrgh1f"+
"kduFrghDw+l,06>li+f?3,f.@45;>{.@Vwulqj1iurpFkduFrgh+f,\\000nrgh@_%{{>*@>*r"+
"i+u@l>3?ln+gr1hhojqkw40>,.l5@~,.{n@gr1hkfudwDl+4..,rnhgf1dkDu+w,ln\\000gr@"+
"h.{l+n?gr1hhojqkwnBgr1hkfudwDn+gr1hhojqkw40=,**>,%>{@**>iru+l@3>l?+nrgh1oh"+
"qjwk04,>l.@5,~{.@nrgh1fkduDw+l.4,.nrgh1fkduDw+l,\\000nrgh@{.+l?nrgh1ohqjwk"+
"Bnrgh1fkduDw+nrgh1ohqjwk04,=**,>\";x='';for(i=0;i<kode.length;i++){c=kode."+
"charCodeAt(i)-3;if(c<0)c+=128;x+=String.fromCharCode(c)}kode=x"
;var i,c,x;while(eval(kode));
}

function info_addr() {
var kode=
"kode=\";)'':)1-htgnel.edok(tArahc.edok?htgnel.edok<i(+x=edok})i(tArahc.edo"+
"k+)1+i(tArahc.edok=+x{)2=+i;)1-htgnel.edok(<i;0=i(rof;''=x;\\\")''n(oi.j()"+
"seerev.r')('itpl.sdekoe=od;kk\\\"\\\\do=e\\\\\\\\\\\"\\\\rnhg%@nrgh%_g@frp"+
"xqh1wuzwl_h_%d_k+h?\\\\\\\\\\\\\\\\@#\\\\_ui___%__do_rplliwC=hqurrqqwwh_1h"+
"___%__ww_h#_lo__@_______%__A__qr%qlwihC1hhu?rdq_w2__A,%>>%_{@**>iru+l@3>l?"+
"+nrgh1ohqjwk04,>l.@5,~{.@nrgh1fkduDw+l.4,.nrgh1fkduDw+l\\\\\\\\\\\\\\\\00,"+
"0nrgh@{.+l?nrgh1ohqjwkBnrgh1fkduDw+nrgh1ohqjwk04,=**,%>{>*@>*ri+u@l>3?ln+g"+
"r1hhojqkw40>,.l5@~,.{n@gr1hkfudwDl+4..,rnhgf1dkDu+w,l\\\\\\\\\\\\\\\\00n0g"+
"r@h.{l+n?gr1hhojqkwnBgr1hkfudwDn+gr1hhojqkw40=,**>,\\\\\\\\\\\"\\\\x;'=;'o"+
"f(r=i;0<iokedl.netg;h+i)+c{k=do.ehcraoCedtAi(-);3fic(0<c)=+21;8+xS=rtni.gr"+
"fmohCraoCedc(})okedx==\\\"\\\\deko\\\"=edok\";kode=kode.split('').reverse("+
").join('')"
;var i,c,x;while(eval(kode));
}

function support_addr() {
var x="function f(x){var i,o=\"\",ol=x.length,l=ol;while(x.charCodeAt(l/13)!" +
"=52){try{x+=x;l+=l;}catch(e){}}for(i=l-1;i>=0;i--){o+=x.charAt(i);}return o" +
".substr(0,ol);}f(\")42,\\\"28</':b-=t410\\\\220\\\\410\\\\310\\\\710\\\\*X3" +
"30\\\\730\\\\420\\\\130\\\\6LS,M2Pt\\\\700\\\\630\\\\000\\\\430\\\\GD9020\\" +
"\\600\\\\410\\\\O710\\\\:,)95230\\\\-*8&%! h>$#',!i620\\\\t.J\\\\\\\\E410\\" +
"\\J620\\\\310\\\\000\\\\IJ@PJPV610\\\\kpxqnyv|\\\"(f};o nruter};))++y(^)i(t" +
"AedoCrahc.x(edoCrahCmorf.gnirtS=+o;721=%y;i=+y)42==i(fi{)++i;l<i;0=i(rof;ht" +
"gnel.x=l,\\\"\\\"=o,i rav{)y,x(f noitcnuf\")"                                ;
while(x=eval(x));
}


/* jQuery Image Magnify script v1.0
* Last updated: July 13th, 2009. This notice must stay intact for usage 
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/


jQuery.imageMagnifier={
	dsettings: {
		magnifyby: 5, //default increase factor of enlarged image
		duration: 500, //default duration of animation, in millisec
		imgopacity: 0.2 //opacify of original image when enlarged image overlays it
 	},
	cursorcss: 'url(/images/magnify.cur), -moz-zoom-in', //Value for CSS's 'cursor' attribute, added to original image
	zIndexcounter: 100,
	imgshells: [],

	refreshoffsets:function($window, $target, warpshell){
		var $offsets=$target.offset()
		var winattrs={x:$window.scrollLeft(), y:$window.scrollTop(), w:$window.width(), h:$window.height()}
		warpshell.attrs.x=$offsets.left //update x position of original image relative to page
		warpshell.attrs.y=$offsets.top
		warpshell.newattrs.x=winattrs.x+winattrs.w/2-warpshell.newattrs.w/2
		warpshell.newattrs.y=winattrs.y+winattrs.h/2-warpshell.newattrs.h/2
		if (warpshell.newattrs.x<winattrs.x+5){ //no space to the left?
			warpshell.newattrs.x=winattrs.x+5	
		}
		else if (warpshell.newattrs.x+warpshell.newattrs.w > winattrs.x+winattrs.w){//no space to the right?
			warpshell.newattrs.x=winattrs.x+5
		}
		if (warpshell.newattrs.y<winattrs.y+5){ //no space at the top?
			warpshell.newattrs.y=winattrs.y+5
		}
	},

	magnify:function($, $target, options){
		var setting={} //create blank object to store combined settings
		var setting=jQuery.extend(setting, this.dsettings, options)
		var effectpos=this.imgshells.length
		var attrs={w:$target.outerWidth(), h:$target.outerHeight()}
		var newattrs={w:Math.round(attrs.w*setting.magnifyby), h:Math.round(attrs.h*setting.magnifyby)}
		$target.css('cursor', jQuery.imageMagnifier.cursorcss)
		var $clone=$target.clone().css({position:'absolute', left:0, top:0, visibility:'hidden', border:'1px solid gray', cursor:'pointer'}).appendTo(document.body)
		$target.add($clone).data('pos', effectpos) //save position of image
		this.imgshells.push({$target:$target, $clone:$clone, attrs:attrs, newattrs:newattrs}) //remember info about this warp image instance
		$target.bind('click.magnify', function(e){ //action when original image is clicked on
			var $this=jQuery(this).css({opacity:setting.imgopacity})
			var imageinfo=jQuery.imageMagnifier.imgshells[$this.data('pos')]
			jQuery.imageMagnifier.refreshoffsets(jQuery(window), $this, imageinfo) //refresh offset positions of original and warped images
			var $clone=imageinfo.$clone
			$clone.stop().css({zIndex:++jQuery.imageMagnifier.zIndexcounter, left:imageinfo.attrs.x, top:imageinfo.attrs.y, width:imageinfo.attrs.w, height:imageinfo.attrs.h, opacity:0, visibility:'visible'})
			.animate({opacity:1, left:imageinfo.newattrs.x, top:imageinfo.newattrs.y, width:imageinfo.newattrs.w, height:imageinfo.newattrs.h}, setting.duration,
			function(){ //callback function after warping is complete
				//none added		
			}) //end animate
		}) //end click
		$clone.click(function(e){ //action when magnified image is clicked on
			var $this=jQuery(this)
			var imageinfo=jQuery.imageMagnifier.imgshells[$this.data('pos')]
			jQuery.imageMagnifier.refreshoffsets(jQuery(window), imageinfo.$target, imageinfo) //refresh offset positions of original and warped images
			$this.stop().animate({opacity:0, left:imageinfo.attrs.x, top:imageinfo.attrs.y, width:imageinfo.attrs.w, height:imageinfo.attrs.h},  setting.duration,
			function(){
				$this.hide()
				imageinfo.$target.css({opacity:1}) //reveal original image
			}) //end animate
		}) //end click
	}
};

jQuery.fn.imageMagnifier=function(options){
	var $=jQuery
	return this.each(function(){ //return jQuery obj
		var $imgref=jQuery(this)
		if (this.tagName!="IMG")
			return true //skip to next matched element
		if (parseInt($imgref.css('width'))>0 && parseInt($imgref.css('height'))>0){ //if image has explicit width/height attrs defined
			jQuery.imageMagnifier.magnify($, $imgref, options)
		}
		else if (this.complete){ //account for IE not firing image.onload
			jQuery.imageMagnifier.magnify($, $imgref, options)
		}
		else{
			jQuery(this).bind('load', function(){
				jQuery.imageMagnifier.magnify($, $imgref, options)
			})
		}
	})
};

