/** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1;}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires="; expires="+date.toUTCString();}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",value,expires,path,domain,secure].join("");}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); /* idTabs ~ Sean Catchpole - Version 2.2 - MIT/GPL */ (function(){var dep={"jQuery":"http://code.jquery.com/jquery-latest.min.js"};var init=function(){(function($){$.fn.idTabs=function(){var s={};for(var i=0;i1){firstDayOffset-=7;}var weeksToDraw=Math.ceil(((-1*firstDayOffset+1)+currentDate.getDaysInMonth())/7);currentDate.addDays(firstDayOffset-1);var doHover=function(firstDayInBounds){return function(){if(s.hoverClass){var $this=$(this);if(!s.selectWeek){$this.addClass(s.hoverClass);}else{if(firstDayInBounds&&!$this.is(".disabled")){$this.parent().addClass("activeWeekHover");}}}};};var unHover=function(){if(s.hoverClass){var $this=$(this);$this.removeClass(s.hoverClass);$this.parent().removeClass("activeWeekHover");}};var w=0;while(w++s.dpController.startDate:false;for(var i=0;i<7;i++){var thisMonth=currentDate.getMonth()==month;var d=$(dc("td")).text(currentDate.getDate()+"").addClass((thisMonth?"current-month ":"other-month ")+(currentDate.isWeekend()?"weekend ":"weekday ")+(thisMonth&¤tDate.getTime()==today.getTime()?"today ":"")).data("datePickerDate",currentDate.asString()).hover(doHover(firstDayInBounds),unHover);r.append(d);if(s.renderCallback){s.renderCallback(d,currentDate,month,year);}currentDate=new Date(currentDate.getFullYear(),currentDate.getMonth(),currentDate.getDate()+1,12,0,0);}tbody.append(r);}calendarTable.append(tbody);return this.each(function(){$(this).empty().append(calendarTable);});},datePicker:function(s){if(!$.event._dpCache){$.event._dpCache=[];}s=$.extend({},$.fn.datePicker.defaults,s);return this.each(function(){var $this=$(this);var alreadyExists=true;if(!this._dpId){this._dpId=$.event.guid++;$.event._dpCache[this._dpId]=new DatePicker(this);alreadyExists=false;}if(s.inline){s.createButton=false;s.displayClose=false;s.closeOnSelect=false;$this.empty();}var controller=$.event._dpCache[this._dpId];controller.init(s);if(!alreadyExists&&s.createButton){controller.button=$(''+$.dpText.TEXT_CHOOSE_DATE+"").bind("click",function(){$this.dpDisplay(this);this.blur();return false;});$this.after(controller.button);}if(!alreadyExists&&$this.is(":text")){$this.bind("dateSelected",function(e,selectedDate,$td){this.value=selectedDate.asString();}).bind("change",function(){if(this.value==""){controller.clearSelected();}else{var d=Date.fromString(this.value);if(d){controller.setSelected(d,true,true);}}});if(s.clickInput){$this.bind("click",function(){$this.trigger("change");$this.dpDisplay();});}var d=Date.fromString(this.value);if(this.value!=""&&d){controller.setSelected(d,true,true);}}$this.addClass("dp-applied");});},dpSetDisabled:function(s){return _w.call(this,"setDisabled",s);},dpSetStartDate:function(d){return _w.call(this,"setStartDate",d);},dpSetEndDate:function(d){return _w.call(this,"setEndDate",d);},dpGetSelected:function(){var c=_getController(this[0]);if(c){return c.getSelected();}return null;},dpSetSelected:function(d,v,m,e){if(v==undefined){v=true;}if(m==undefined){m=true;}if(e==undefined){e=true;}return _w.call(this,"setSelected",Date.fromString(d),v,m,e);},dpSetDisplayedMonth:function(m,y){return _w.call(this,"setDisplayedMonth",Number(m),Number(y),true);},dpDisplay:function(e){return _w.call(this,"display",e);},dpSetRenderCallback:function(a){return _w.call(this,"setRenderCallback",a);},dpSetPosition:function(v,h){return _w.call(this,"setPosition",v,h);},dpSetOffset:function(v,h){return _w.call(this,"setOffset",v,h);},dpClose:function(){return _w.call(this,"_closeCalendar",false,this[0]);},_dpDestroy:function(){}});var _w=function(f,a1,a2,a3,a4){return this.each(function(){var c=_getController(this);if(c){c[f](a1,a2,a3,a4);}});};function DatePicker(ele){this.ele=ele;this.displayedMonth=null;this.displayedYear=null;this.startDate=null;this.endDate=null;this.showYearNavigation=null;this.closeOnSelect=null;this.displayClose=null;this.rememberViewedMonth=null;this.selectMultiple=null;this.numSelectable=null;this.numSelected=null;this.verticalPosition=null;this.horizontalPosition=null;this.verticalOffset=null;this.horizontalOffset=null;this.button=null;this.renderCallback=[];this.selectedDates={};this.inline=null;this.context="#dp-popup";this.settings={};}$.extend(DatePicker.prototype,{init:function(s){this.setStartDate(s.startDate);this.setEndDate(s.endDate);this.setDisplayedMonth(Number(s.month),Number(s.year));this.setRenderCallback(s.renderCallback);this.showYearNavigation=s.showYearNavigation;this.closeOnSelect=s.closeOnSelect;this.displayClose=s.displayClose;this.rememberViewedMonth=s.rememberViewedMonth;this.selectMultiple=s.selectMultiple;this.numSelectable=s.selectMultiple?s.numSelectable:1;this.numSelected=0;this.verticalPosition=s.verticalPosition;this.horizontalPosition=s.horizontalPosition;this.hoverClass=s.hoverClass;this.setOffset(s.verticalOffset,s.horizontalOffset);this.inline=s.inline;this.settings=s;if(this.inline){this.context=this.ele;this.display();}},setStartDate:function(d){if(d){this.startDate=Date.fromString(d);}if(!this.startDate){this.startDate=(new Date()).zeroTime();}this.setDisplayedMonth(this.displayedMonth,this.displayedYear);},setEndDate:function(d){if(d){this.endDate=Date.fromString(d);}if(!this.endDate){this.endDate=(new Date("12/31/2999"));}if(this.endDate.getTime()e.getTime()){t=e;}}var oldMonth=this.displayedMonth;var oldYear=this.displayedYear;this.displayedMonth=t.getMonth();this.displayedYear=t.getFullYear();if(rerender&&(this.displayedMonth!=oldMonth||this.displayedYear!=oldYear)){this._rerenderCalendar();$(this.ele).trigger("dpMonthChanged",[this.displayedMonth,this.displayedYear]);}},setSelected:function(d,v,moveToMonth,dispatchEvents){if(dthis.endDate){return;}var s=this.settings;if(s.selectWeek){d=d.addDays(-(d.getDay()-Date.firstDayOfWeek+7)%7);if(d").attr(attrs).css(cssRules).append($("

"),$('
').append($('<<').bind("click",function(){return c._displayNewMonth.call(c,this,0,-1);}),$('<').bind("click",function(){return c._displayNewMonth.call(c,this,-1,0);})),$('
').append($('>>').bind("click",function(){return c._displayNewMonth.call(c,this,0,1);}),$('>').bind("click",function(){return c._displayNewMonth.call(c,this,1,0);})),$('
')).bgIframe());var $pop=this.inline?$(".dp-popup",this.context):$("#dp-popup");if(this.showYearNavigation==false){$(".dp-nav-prev-year, .dp-nav-next-year",c.context).css("display","none");}if(this.displayClose){$pop.append($(''+$.dpText.TEXT_CLOSE+"").bind("click",function(){c._closeCalendar();return false;}));}c._renderCalendar();$(this.ele).trigger("dpDisplayed",$pop);if(!c.inline){if(this.verticalPosition==$.dpConst.POS_BOTTOM){$pop.css("top",eleOffset.top+$ele.height()-$pop.height()+c.verticalOffset);}if(this.horizontalPosition==$.dpConst.POS_RIGHT){$pop.css("left",eleOffset.left+$ele.width()-$pop.width()+c.horizontalOffset);}$(document).bind("mousedown.datepicker",this._checkMouse);}},setRenderCallback:function(a){if(a==null){return;}if(a&&typeof(a)=="function"){a=[a];}this.renderCallback=this.renderCallback.concat(a);},cellRender:function($td,thisDate,month,year){var c=this.dpController;var d=new Date(thisDate.getTime());$td.bind("click",function(){var $this=$(this);if(!$this.is(".disabled")){c.setSelected(d,!$this.is(".selected")||!c.selectMultiple,false,true);if(c.closeOnSelect){c._closeCalendar();}if(!$.browser.msie){$(c.ele).trigger("focus",[$.dpConst.DP_INTERNAL_FOCUS]);}}});if(c.isSelected(d)){$td.addClass("selected");if(c.settings.selectWeek){$td.parent().addClass("selectedWeek");}}else{if(c.selectMultiple&&c.numSelected==c.numSelectable){$td.addClass("unselectable");}}},_applyRenderCallbacks:function(){var c=this;$("td",this.context).each(function(){for(var i=0;i20){$this.addClass("disabled");}});var d=this.startDate.getDate();$(".dp-calendar td.current-month",this.context).each(function(){var $this=$(this);if(Number($this.text())20){var st=this.startDate.getTime();var sd=new Date(st);sd.addMonths(1);if(this.displayedYear==sd.getFullYear()&&this.displayedMonth==sd.getMonth()){$(".dp-calendar td.other-month",this.context).each(function(){var $this=$(this);if(Date.fromString($this.data("datePickerDate")).getTime()d){$this.addClass("disabled");}});}else{$(".dp-nav-next-year",this.context).removeClass("disabled");$(".dp-nav-next-month",this.context).removeClass("disabled");var d=this.endDate.getDate();if(d<13){var ed=new Date(this.endDate.getTime());ed.addMonths(-1);if(this.displayedYear==ed.getFullYear()&&this.displayedMonth==ed.getMonth()){$(".dp-calendar td.other-month",this.context).each(function(){var $this=$(this);var cellDay=Number($this.text());if(cellDay<13&&cellDay>d){$this.addClass("disabled");}});}}}this._applyRenderCallbacks();},_closeCalendar:function(programatic,ele){if(!ele||ele==this.ele){$(document).unbind("mousedown.datepicker");$(document).unbind("keydown.datepicker");this._clearCalendar();$("#dp-popup a").unbind();$("#dp-popup").empty().remove();if(!programatic){$(this.ele).trigger("dpClosed",[this.getSelected()]);}}},_clearCalendar:function(){$(".dp-calendar td",this.context).unbind();$(".dp-calendar",this.context).empty();}});$.dpConst={SHOW_HEADER_NONE:0,SHOW_HEADER_SHORT:1,SHOW_HEADER_LONG:2,POS_TOP:0,POS_BOTTOM:1,POS_LEFT:0,POS_RIGHT:1,DP_INTERNAL_FOCUS:"dpInternalFocusTrigger"};$.dpText={TEXT_PREV_YEAR:"Previous year",TEXT_PREV_MONTH:"Previous month",TEXT_NEXT_YEAR:"Next year",TEXT_NEXT_MONTH:"Next month",TEXT_CLOSE:"Close",TEXT_CHOOSE_DATE:"Choose date",HEADER_FORMAT:"mmmm yyyy"};$.dpVersion="$Id: jquery.datePicker.js 84 2009-08-05 17:54:35Z kelvin.luck@gmail.com $";$.fn.datePicker.defaults={month:undefined,year:undefined,showHeader:$.dpConst.SHOW_HEADER_SHORT,startDate:undefined,endDate:undefined,inline:false,renderCallback:null,createButton:true,showYearNavigation:true,closeOnSelect:true,displayClose:false,selectMultiple:false,numSelectable:Number.MAX_VALUE,clickInput:false,rememberViewedMonth:true,selectWeek:false,verticalPosition:$.dpConst.POS_TOP,horizontalPosition:$.dpConst.POS_LEFT,verticalOffset:0,horizontalOffset:0,hoverClass:"dp-hover"};function _getController(ele){if(ele._dpId){return $.event._dpCache[ele._dpId];}return false;}if($.fn.bgIframe==undefined){$.fn.bgIframe=function(){return this;};}$(window).bind("unload",function(){var els=$.event._dpCache||[];for(var i in els){$(els[i].ele)._dpDestroy();}});})(jQuery); /* * vertical news ticker * Tadas Juozapaitis ( kasp3rito@gmail.com ) * http://plugins.jquery.com/project/vTicker */ (function(a){a.fn.vTicker=function(b){var c={speed:700,pause:4000,showItems:3,animation:"",mousePause:true,isPaused:false,direction:"up",height:0};var b=a.extend(c,b);moveUp=function(g,d,e){if(e.isPaused){return}var f=g.children("ul");var h=f.children("li:first").clone(true);if(e.height>0){d=f.children("li:first").height()}f.animate({top:"-="+d+"px"},e.speed,function(){a(this).children("li:first").remove();a(this).css("top","0px")});if(e.animation=="fade"){f.children("li:first").fadeOut(e.speed);if(e.height==0){f.children("li:eq("+e.showItems+")").hide().fadeIn(e.speed)}}h.appendTo(f)};moveDown=function(g,d,e){if(e.isPaused){return}var f=g.children("ul");var h=f.children("li:last").clone(true);if(e.height>0){d=f.children("li:first").height()}f.css("top","-"+d+"px").prepend(h);f.animate({top:0},e.speed,function(){a(this).children("li:last").remove()});if(e.animation=="fade"){if(e.height==0){f.children("li:eq("+e.showItems+")").fadeOut(e.speed)}f.children("li:first").hide().fadeIn(e.speed)}};return this.each(function(){var f=a(this);var e=0;f.css({overflow:"hidden",position:"relative"}).children("ul").css({position:"absolute",margin:0,padding:0}).children("li").css({margin:0,padding:0});if(b.height==0){f.children("ul").children("li").each(function(){if(a(this).height()>e){e=a(this).height()}});f.children("ul").children("li").each(function(){a(this).height(e)});f.height(e*b.showItems)}else{f.height(b.height)}var d=setInterval(function(){if(b.direction=="up"){moveUp(f,e,b)}else{moveDown(f,e,b)}},b.pause);if(b.mousePause){f.bind("mouseenter",function(){b.isPaused=true}).bind("mouseleave",function(){b.isPaused=false})}})}})(jQuery); (function($){$.fn.jTruncate=function(h){var i={length:300,minTrail:20,moreText:"more",lessText:"less",ellipsisText:"...",moreAni:"",lessAni:""};var h=$.extend(i,h);return this.each(function(){obj=$(this);var a=obj.html();if(a.length>h.length+h.minTrail){var b=a.indexOf(' ',h.length);if(b!=-1){var b=a.indexOf(' ',h.length);var c=a.substring(0,b);var d=a.substring(b,a.length-1);obj.html(c+''+h.ellipsisText+''+''+d+'');obj.find('.truncate_more').css("display","none");obj.append('');var e=$('.truncate_more_link',obj);var f=$('.truncate_more',obj);var g=$('.truncate_ellipsis',obj);e.click(function(){if(e.text()==h.moreText){f.show(h.moreAni);e.text(h.lessText);g.css("display","none")}else{f.hide(h.lessAni);e.text(h.moreText);g.css("display","inline")}return false})}}})}})(jQuery);