// PNG fix
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([237-9n-zA-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(s(m){3.fn.pngFix=s(c){c=3.extend({P:\'blank.gif\'},c);8 e=(o.Q=="t R S"&&T(o.u)==4&&o.u.A("U 5.5")!=-1);8 f=(o.Q=="t R S"&&T(o.u)==4&&o.u.A("U 6.0")!=-1);p(3.browser.msie&&(e||f)){3(2).B("img[n$=.C]").D(s(){3(2).7(\'q\',3(2).q());3(2).7(\'r\',3(2).r());8 a=\'\';8 b=\'\';8 g=(3(2).7(\'E\'))?\'E="\'+3(2).7(\'E\')+\'" \':\'\';8 h=(3(2).7(\'F\'))?\'F="\'+3(2).7(\'F\')+\'" \':\'\';8 i=(3(2).7(\'G\'))?\'G="\'+3(2).7(\'G\')+\'" \':\'\';8 j=(3(2).7(\'H\'))?\'H="\'+3(2).7(\'H\')+\'" \':\'\';8 k=(3(2).7(\'V\'))?\'float:\'+3(2).7(\'V\')+\';\':\'\';8 d=(3(2).parent().7(\'href\'))?\'cursor:hand;\':\'\';p(2.9.v){a+=\'v:\'+2.9.v+\';\';2.9.v=\'\'}p(2.9.w){a+=\'w:\'+2.9.w+\';\';2.9.w=\'\'}p(2.9.x){a+=\'x:\'+2.9.x+\';\';2.9.x=\'\'}8 l=(2.9.cssText);b+=\'<y \'+g+h+i+j;b+=\'9="W:X;white-space:pre-line;Y:Z-10;I:transparent;\'+k+d;b+=\'q:\'+3(2).q()+\'z;r:\'+3(2).r()+\'z;\';b+=\'J:K:L.t.M(n=\\\'\'+3(2).7(\'n\')+\'\\\', N=\\\'O\\\');\';b+=l+\'"></y>\';p(a!=\'\'){b=\'<y 9="W:X;Y:Z-10;\'+a+d+\'q:\'+3(2).q()+\'z;r:\'+3(2).r()+\'z;">\'+b+\'</y>\'}3(2).hide();3(2).after(b)});3(2).B("*").D(s(){8 a=3(2).11(\'I-12\');p(a.A(".C")!=-1){8 b=a.13(\'url("\')[1].13(\'")\')[0];3(2).11(\'I-12\',\'none\');3(2).14(0).15.J="K:L.t.M(n=\'"+b+"\',N=\'O\')"}});3(2).B("input[n$=.C]").D(s(){8 a=3(2).7(\'n\');3(2).14(0).15.J=\'K:L.t.M(n=\\\'\'+a+\'\\\', N=\\\'O\\\');\';3(2).7(\'n\',c.P)})}return 3}})(3);',[],68,'||this|jQuery||||attr|var|style||||||||||||||src|navigator|if|width|height|function|Microsoft|appVersion|border|padding|margin|span|px|indexOf|find|png|each|id|class|title|alt|background|filter|progid|DXImageTransform|AlphaImageLoader|sizingMethod|scale|blankgif|appName|Internet|Explorer|parseInt|MSIE|align|position|relative|display|inline|block|css|image|split|get|runtimeStyle'.split('|'),0,{}));;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:true,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);
// Jquery max image
(function($){jQuery.fn.maxImage=function(options){var resizeMsgDefaults={show:false,location:'before',message:'Original: ([w]w x [h]h)'};var opts=jQuery.extend({wait:true,imageArray:[],maxFollows:'both',verticalOffset:0,horizontalOffset:0,leftSpace:0,topSpace:0,rightSpace:0,bottomSpace:0,overflow:'hidden',position:'absolute',isBackground:false,zIndex:-10,verticalAlign:'bottom',horizontalAlign:'left',maxAtOrigImageSize:false,slideShow:true,slideDelay:5,slideShowTitle:true,loaderClass:'loader',resizeMsg:resizeMsgDefaults},options);opts.resizeMsg=jQuery.extend(resizeMsgDefaults,options.resizeMsg); var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;} function _start(image,jQueryMatchedObj){if(opts.slideShow){_setup_slideshow(jQueryMatchedObj);}else if(opts.isBackground){Background._setup_background(image);}else{Others._setup_others(image,opts);}} Others={_setup_others:function(image,opts){$this=$(image);$(window).load(function(){_get_orig_data($this);_size_image($this);Others._configure_css(image,opts);$(window).resize(function(){_size_image($this);});});},_configure_css:function(image,opts){if(opts.position=='absolute'){$(image).css({'overflow':'hidden','left':opts.leftSpace,'top':opts.topSpace,'position':'absolute'});if(opts.verticalAlign=='bottom'){$(image).css({'bottom':opts.bottomSpace});} if(opts.horizontalAlign=='right'){$(image).css({'right':opts.rightSpace});}}else{$(image).css({'margin-top':opts.topSpace,'margin-right':opts.rightSpace,'margin-bottom':opts.bottomSpace,'margin-left':opts.leftSpace,'position':'relative'});}}}; Background={_setup_background:function(image){$this=$(image);$this.hide();Background._configure_css(image);$(window).load(function(){_get_orig_data($this);_size_image($this);$this.show();$(window).resize(function(){_size_image($this);});});},_configure_css:function(image){$(image).css({'z-index':opts.zIndex});if(opts.position=='absolute'){$(image).css({'overflow':'hidden','left':opts.leftSpace,'top':opts.topSpace,'position':'absolute'});$('html').css({'overflow-y':opts.overflow});if(opts.verticalAlign=='bottom'){$(image).css({'bottom':opts.bottomSpace});} if(opts.horizontalAlign=='right'){$(image).css({'right':opts.rightSpace});}}else{$(image).css({'margin-top':opts.topSpace,'margin-right':opts.rightSpace,'margin-bottom':opts.bottomSpace,'margin-left':opts.leftSpace,'position':'relative'});}}}; function _setup_slideshow(jQueryMatchedObj){_build_slideshow_structure(jQueryMatchedObj);opts.imageArray.length=0;if(jQueryMatchedObj.length==1){opts.imageArray.push(new Array(objClicked.getAttribute('src'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){opts.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('src'),jQueryMatchedObj[i].getAttribute('title')));$(jQueryMatchedObj[i]).attr('original',$(jQueryMatchedObj[i]).attr('src')).attr('src','');}} _loads_image(0);_configure_css();} function _build_slideshow_structure(){for(var i=0;i<jQueryMatchedObj.length;i++){$(jQueryMatchedObj[i]).addClass('slides slide-'+i).after('<div class="slideTitle">'+$(jQueryMatchedObj[i]).attr('title')+'</div>');} $('.slideTitle').hide().css({'padding':'10px','background':'#e0e0e0','position':'absolute','bottom':'0','right':'5%','opacity':'0.8'});} function _loads_image(nums){var currentImage=nums;var objImagePreloader=new Image();objImagePreloader.onload=function(){$('.slide-'+currentImage).attr('src',opts.imageArray[currentImage][0]);_get_orig_data($('.slide-'+currentImage));_size_image($('.slide-'+currentImage));$(window).resize(function(){_size_image($('.slide-'+currentImage));});if(currentImage==0){_start_timer();} if(currentImage<opts.imageArray.length-1){currentImage++;_loads_image(currentImage);}}; objImagePreloader.src=opts.imageArray[currentImage][0];} function _start_timer(){var currentSlide=0;_configure_css();$('.'+opts.loaderClass).hide();$('.slide-'+currentSlide).css({'z-index':opts.zIndex}).fadeIn();if(opts.slideShowTitle){$('.slide-'+currentSlide).next('.slideTitle').css({'z-index':opts.zIndex+1}).fadeIn();} var slideInterval=setInterval(function(){if(currentSlide<opts.imageArray.length-1){currentSlide++;lastSlide=currentSlide-1;}else{currentSlide=0;lastSlide=opts.imageArray.length-1;} $('.slide-'+lastSlide).css({'z-index':opts.zIndex-1}).fadeOut('slow');$('.slide-'+currentSlide).css({'z-index':opts.zIndex}).fadeIn('slow');if(opts.slideShowTitle){next_title(currentSlide,lastSlide);}},(opts.slideDelay*1000));} function _configure_css(){for(i=0;i<opts.imageArray.length;i++){if(opts.position=='absolute'){$('.slide-'+i).css({'position':'absolute','overflow':'hidden'});$('html').css({'overflow-y':opts.overflow});if(opts.verticalAlign=='bottom'){$('.slide-'+i).css({'bottom':opts.bottomSpace});}else{$('.slide-'+i).css({'top':opts.topSpace});} if(opts.horizontalAlign=='right'){$('.slide-'+i).css({'right':opts.rightSpace});}else{$('.slide-'+i).css({'left':opts.leftSpace});}}else{$('.slide-'+i).css({'margin-top':opts.topSpace,'margin-right':opts.rightSpace,'margin-bottom':opts.bottomSpace,'margin-left':opts.leftSpace,'position':'relative'});} $('.slide-'+i).next('.slideTitle').css({'position':'absolute','bottom':0,'right':'5%'});}} function next_title(currentSlide,lastSlide){$('.slide-'+lastSlide).next('.slideTitle').fadeOut();$('.slide-'+currentSlide).next('.slideTitle').fadeIn();} function _get_orig_data(image){$this=image;$this.attr('origWidth',$this.width());$this.attr('origHeight',$this.height());$this.attr('ratio',find_ratio($this.width(),$this.height()));} function _size_image(image){$this=image;var originalWidth=to_i($this.attr('origWidth'));var originalHeight=to_i($this.attr('origHeight'));var ratio=$this.attr('ratio');if(originalWidth==0||originalHeight==0){setTimeout(function(){_get_orig_data(image);_size_image(image);},100);return;} var width_and_height=[];width_and_height=find_width_and_height(originalWidth,originalHeight,ratio);$this.width(width_and_height[0]);$this.height(width_and_height[1]);_show_resize_message(originalWidth,originalHeight,image);} function _show_resize_message(originalWidth,originalHeight,image){if((to_i($this.width())!=originalWidth||to_i($this.height())!=originalHeight)&&opts.resizeMsg.show){$(".maximage_resized").remove();opts.resizeMsg.message=opts.resizeMsg.message.replace('[w]',originalWidth).replace('[h]',originalHeight);var insertStr='<div class="maximage_resized">'+opts.resizeMsg.message+'</div>';if(opts.resizeMsg.location.toLowerCase()=="before"){$this.before(insertStr);}else{$this.after(insertStr);}}} function find_width_and_height(originalWidth,originalHeight,ratio){var pageWidth=$(window).width()-opts.horizontalOffset;var pageHeight=$(window).height()-opts.verticalOffset;if(!opts.isBackground){if(opts.maxFollows=='both'){max_follows_width(pageWidth,ratio);if(height>pageHeight){max_follows_height(pageHeight,ratio);}}else if(opts.maxFollows=='width'){max_follows_width(pageWidth,ratio);}else if(opts.maxFollows=='height'){max_follows_height(pageHeight,ratio);}}else{width=pageWidth+1;height=width/ratio;if(height<pageHeight){height=pageHeight-(opts.topSpace+opts.bottomSpace);width=height*ratio;}} if(opts.maxAtOrigImageSize&&width>originalWidth){arrayImageSize=new Array(originalWidth,originalHeight);}else{arrayImageSize=new Array(width,height);} return arrayImageSize;} function max_follows_height(pageHeight,ratio){height=pageHeight-(opts.topSpace+opts.bottomSpace);width=height*ratio;} function max_follows_width(pageWidth,ratio){width=pageWidth-(opts.leftSpace+opts.rightSpace);height=width/ratio;}
function find_ratio(width,height){width=to_i(width);height=to_i(height);var ratio=width/height;ratio=ratio.toFixed(2);return ratio;} function to_i(i){last=parseInt(i);return last;} function debug($obj){if(window.console&&window.console.log){window.console.log($obj);}} return this.each(_initialize);};})(jQuery);
// cool clock
window.CoolClock=function(canvasId,displayRadius,skinId,showSecondHand,gmtOffset){return this.init(canvasId,displayRadius,skinId,showSecondHand,gmtOffset);}; CoolClock.config={tickDelay:1000,longTickDelay:15000,defaultRadius:85,renderRadius:100,defaultSkin:"swissRail",skins:{swissRail:{outerBorder:{lineWidth:185,radius:1,color:"#fff",alpha:1},smallIndicator:{lineWidth:1,startAt:89,endAt:94,color:"#444",alpha:1},largeIndicator:{lineWidth:4,startAt:83,endAt:94,color:"#242424",alpha:1},hourHand:{lineWidth:7,startAt:0,endAt:50,color:"#444",alpha:1},minuteHand:{lineWidth:3,startAt:0,endAt:70,color:"#626262",alpha:1},secondHand:{lineWidth:2,startAt:-20,endAt:85,color:"#808080",alpha:.85},secondDecoration:{lineWidth:3,startAt:0,radius:2,fillColor:"#000",color:"#000",alpha:1}}},isIE:!!document.all,clockTracker:{},noIdCount:0};CoolClock.prototype={init:function(canvasId,displayRadius,skinId,showSecondHand,gmtOffset){this.canvasId=canvasId;this.displayRadius=displayRadius||CoolClock.config.defaultRadius;this.skinId=skinId||CoolClock.config.defaultSkin;this.showSecondHand=typeof showSecondHand=="boolean"?showSecondHand:true;this.tickDelay=CoolClock.config[this.showSecondHand?"tickDelay":"longTickDelay"];this.gmtOffset=gmtOffset!=null?parseFloat(gmtOffset):gmtOffset;this.canvas=document.getElementById(canvasId);this.canvas.setAttribute("width",this.displayRadius*2);this.canvas.setAttribute("height",this.displayRadius*2);this.canvas.style.width=this.displayRadius*2+"px";this.canvas.style.height=this.displayRadius*2+"px";this.renderRadius=CoolClock.config.renderRadius;this.scale=this.displayRadius/this.renderRadius;this.ctx=this.canvas.getContext("2d");this.ctx.scale(this.scale,this.scale);CoolClock.config.clockTracker[canvasId]=this;this.tick();return this;},fullCircleAt:function(x,y,skin){with(this.ctx){save();globalAlpha=skin.alpha;lineWidth=skin.lineWidth;if(!CoolClock.config.isIE){beginPath();} if(CoolClock.config.isIE){lineWidth=lineWidth*this.scale;} arc(x,y,skin.radius,0,2*Math.PI,false);if(CoolClock.config.isIE){arc(x,y,skin.radius,-0.1,0.1,false);} if(skin.fillColor){fillStyle=skin.fillColor; fill();} else{strokeStyle=skin.color;stroke();} restore();}},radialLineAtAngle:function(angleFraction,skin){with(this.ctx){save();translate(this.renderRadius,this.renderRadius);rotate(Math.PI*(2*angleFraction-0.5));globalAlpha=skin.alpha;strokeStyle=skin.color;lineWidth=skin.lineWidth;if(CoolClock.config.isIE) lineWidth=lineWidth*this.scale;if(skin.radius){this.fullCircleAt(skin.startAt,0,skin)} else{beginPath();moveTo(skin.startAt,0); lineTo(skin.endAt,0);stroke();} restore();}},render:function(hour,min,sec){var skin=CoolClock.config.skins[this.skinId];if(!skin)skin=CoolClock.config.skins[CoolClock.config.defaultSkin];this.ctx.clearRect(0,0,this.renderRadius*2,this.renderRadius*2);if(skin.outerBorder) this.fullCircleAt(this.renderRadius,this.renderRadius,skin.outerBorder);for(var i=0;i<60;i++){(i%5)&&skin.smallIndicator&&this.radialLineAtAngle(i/60,skin.smallIndicator);!(i%5)&&skin.largeIndicator&&this.radialLineAtAngle(i/60,skin.largeIndicator);} if(skin.hourHand) this.radialLineAtAngle((hour+min/60)/12,skin.hourHand);if(skin.minuteHand) this.radialLineAtAngle((min+sec/60)/60,skin.minuteHand);if(this.showSecondHand&&skin.secondHand) this.radialLineAtAngle(sec/60,skin.secondHand);if(!CoolClock.config.isIE&&this.showSecondHand&&skin.secondDecoration)
this.radialLineAtAngle(sec/60,skin.secondDecoration);},refreshDisplay:function(){var now=new Date();if(this.gmtOffset!=null){var offsetNow=new Date(now.valueOf()+(this.gmtOffset*1000*60*60));this.render(offsetNow.getUTCHours(),offsetNow.getUTCMinutes(),offsetNow.getUTCSeconds());} else{this.render(now.getHours(),now.getMinutes(),now.getSeconds());}},nextTick:function(){setTimeout("CoolClock.config.clockTracker['"+this.canvasId+"'].tick()",this.tickDelay);},stillHere:function(){return document.getElementById(this.canvasId)!=null;},tick:function(){if(this.stillHere()){this.refreshDisplay(); this.nextTick();}}};CoolClock.findAndCreateClocks=function(){var canvases=document.getElementsByTagName("canvas");for(var i=0;i<canvases.length;i++){var fields=canvases[i].className.split(" ")[0].split(":");if(fields[0]=="CoolClock"){if(!canvases[i].id){canvases[i].id='_coolclock_auto_id_'+CoolClock.config.noIdCount++;} new CoolClock(canvases[i].id,fields[2],fields[1],fields[3]!="noSeconds",fields[4]);}}};if(window.jQuery)jQuery(document).ready(CoolClock.findAndCreateClocks);
// Jquery rotate
jQuery.fn.rotate=function(angle,whence){var p=this.get(0);if(!whence){p.angle=((p.angle==undefined?0:p.angle)+angle)%360;}else{p.angle=angle;}; if(p.angle>=0){var rotation=Math.PI*p.angle/180;}else{var rotation=Math.PI*(360+p.angle)/180;}; var costheta=Math.cos(rotation);var sintheta=Math.sin(rotation);if(document.all&&!window.opera){var canvas=document.createElement('img');canvas.src=p.src;canvas.height=p.height;canvas.width=p.width;canvas.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+costheta+",M12="+(-sintheta)+",M21="+sintheta+",M22="+costheta+",SizingMethod='auto expand')";}else{var canvas=document.createElement('canvas');if(!p.oImage){canvas.oImage=new Image();canvas.oImage.src=p.src;}else{canvas.oImage=p.oImage;}; canvas.style.width=canvas.width=Math.abs(costheta*canvas.oImage.width)+Math.abs(sintheta*canvas.oImage.height);canvas.style.height=canvas.height=Math.abs(costheta*canvas.oImage.height)+Math.abs(sintheta*canvas.oImage.width);var context=canvas.getContext('2d');context.save();if(rotation<=Math.PI/2){context.translate(sintheta*canvas.oImage.height,0);}else if(rotation<=Math.PI){context.translate(canvas.width,-costheta*canvas.oImage.height);}else if(rotation<=1.5*Math.PI){context.translate(-costheta*canvas.oImage.width,canvas.height);}else{context.translate(0,-sintheta*canvas.oImage.width);}; context.rotate(rotation);context.drawImage(canvas.oImage,0,0,canvas.oImage.width,canvas.oImage.height);context.restore();}; canvas.id=p.id;canvas.angle=p.angle;p.parentNode.replaceChild(canvas,p);}; jQuery.fn.rotateRight=function(angle){this.rotate(angle==undefined?90:angle);}; jQuery.fn.rotateLeft=function(angle){this.rotate(angle==undefined?-90:-angle);}
