/* SimplyFade jQuery plugin by Pierrick Calvez */ (function($){ $.fn.simplyfade = function(lequel,tempsin,fadein,tempsout,fadeout){ return this.each(function() { $(this).mouseover(function() { if(lequel ==""){ $(this).fadeTo(tempsin, fadein); }else{ $(lequel).fadeTo(tempsin, fadein); }; }).mouseout(function(){ if(lequel ==""){ $(this).fadeTo(tempsout, fadeout); }else{ $(lequel).fadeTo(tempsout, fadeout); }; $(this).click(function() { if(lequel ==""){ $(this).fadeTo(tempsout, fadeout); }else{ $(lequel).fadeTo(tempsout, fadeout); }; }); }); }); }})(jQuery); /* simpletooltip jQuery plugin by Marius ILIE, visit http://dev.mariusilie.net for details */ (function($){ $.fn.simpletooltip = function(){ return this.each(function() { var text = $(this).attr("title"); $(this).attr("title", ""); if(text != undefined) { $(this).hover(function(e){ $(this).attr("title", ""); $("body").append(""); if($.browser.msie) var tipWidth = $("#simpleTooltip").outerWidth(true) else var tipWidth = $("#simpleTooltip").width() var tipX = e.pageX - (tipWidth / 2); var tipY = e.pageY - 35; $("#simpleTooltip").width(tipWidth); $("#simpleTooltip").css("left", tipX).css("top", tipY).delay(600).fadeIn(50); }, function(){ $("#simpleTooltip").remove(); $(this).attr("title", text); }); $(this).mousemove(function(e){ var tipWidth = $("#simpleTooltip").outerWidth(true); var tipHeight = $("#simpleTooltip").outerHeight(true); var tipX = e.pageX - (tipWidth / 2); var tipY = e.pageY - 35; if(tipX + tipWidth > $(window).scrollLeft() + $(window).width()) tipX = e.pageX - tipWidth; if($(window).height()+$(window).scrollTop() < tipY + tipHeight) tipY = e.pageY - tipHeight; $("#simpleTooltip").css("left", tipX).css("top", tipY).delay(600).fadeIn(50); }); } }); }})(jQuery); /* notooltip : disable tooltips */ (function($){ $.fn.notooltip = function(){ return this.each(function() { var text = $(this).attr("title"); $(this).attr("title", ""); if(text != undefined) { $(this).hover(function(e){ $(this).attr("title", ""); }, function(){ $("#simpleTooltip").remove(); $(this).attr("title", text); }); } }); }})(jQuery); //** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com. //** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09') //** v1.1 (April 7th, 09'): //** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead. //** 2) Fixes scroll animation not working in Opera. var scrolltotop={ //startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control //scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top). setting: {startline:100, scrollto: 0, scrollduration:800, fadeduration:[500, 100]}, controlHTML: '', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol" controlattrs: {offsetx:5, offsety:5}, //offset of control relative to right/ bottom of window corner anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links state: {isvisible:false, shouldvisible:false}, scrollup:function(){ if (!this.cssfixedsupport) //if control is positioned using JavaScript this.$control.css({opacity:0}) //hide control immediately after clicking it var dest=isNaN(this.setting.scrollto)? this.setting.scrollto : parseInt(this.setting.scrollto) if (typeof dest=="string" && jQuery('#'+dest).length==1) //check element set by string exists dest=jQuery('#'+dest).offset().top else dest=0 this.$body.animate({scrollTop: dest}, this.setting.scrollduration); }, keepfixed:function(){ var $window=jQuery(window) var controlx=$window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx var controly=$window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety this.$control.css({left:controlx+'px', top:controly+'px'}) }, togglecontrol:function(){ var scrolltop=jQuery(window).scrollTop() if (!this.cssfixedsupport) this.keepfixed() this.state.shouldvisible=(scrolltop>=this.setting.startline)? true : false if (this.state.shouldvisible && !this.state.isvisible){ this.$control.stop().animate({opacity:1}, this.setting.fadeduration[0]) this.state.isvisible=true } else if (this.state.shouldvisible==false && this.state.isvisible){ this.$control.stop().animate({opacity:0}, this.setting.fadeduration[1]) this.state.isvisible=false } }, init:function(){ jQuery(document).ready(function($){ var mainobj=scrolltotop var iebrws=document.all mainobj.cssfixedsupport=!iebrws || iebrws && document.compatMode=="CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body') mainobj.$control=$('
'+mainobj.controlHTML+'
') .css({position:mainobj.cssfixedsupport? 'fixed' : 'absolute', bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:'pointer'}) .attr({title:'Scroll Back to Top'}) .click(function(){mainobj.scrollup(); return false}) .appendTo('body') if (document.all && !window.XMLHttpRequest && mainobj.$control.text()!='') //loose check for IE6 and below, plus whether control contains any text mainobj.$control.css({width:mainobj.$control.width()}) //IE6- seems to require an explicit width on a DIV containing text mainobj.togglecontrol() $('a[href="' + mainobj.anchorkeyword +'"]').click(function(){ mainobj.scrollup() return false }) $(window).bind('scroll resize', function(e){ mainobj.togglecontrol() }) }) } } scrolltotop.init() /* jQuery Superfish */ ;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$([''].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).prepend($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(){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:false,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 Expander plugin * Version 0.4 (12/09/2008) * @requires jQuery v1.1.1+ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function($) { $.fn.expander = function(options) { var opts = $.extend({}, $.fn.expander.defaults, options); var delayedCollapse; return this.each(function() { var $this = $(this); var o = $.meta ? $.extend({}, opts, $this.data()) : opts; var cleanedTag, startTags, endTags; var allText = $this.html(); var startText = allText.slice(0, o.slicePoint).replace(/\w+$/,''); startTags = startText.match(/<\w[^>]*>/g); if (startTags) {startText = allText.slice(0,o.slicePoint + startTags.join('').length).replace(/\w+$/,'');} if (startText.lastIndexOf('<') > startText.lastIndexOf('>') ) { startText = startText.slice(0,startText.lastIndexOf('<')); } var endText = allText.slice(startText.length); // create necessary expand/collapse elements if they don't already exist if (!$('span.details', this).length) { // end script if text length isn't long enough. if ( endText.replace(/\s+$/,'').split(' ').length < o.widow ) { return; } // otherwise, continue... if (endText.indexOf(' -1) { endTags = endText.match(/<(\/)?[^>]*>/g); for (var i=0; i < endTags.length; i++) { if (endTags[i].indexOf(' -1) { var startTag, startTagExists = false; for (var j=0; j < i; j++) { startTag = endTags[j].slice(0, endTags[j].indexOf(' ')).replace(/(\w)$/,'$1>'); if (startTag == rSlash(endTags[i])) { startTagExists = true; } } if (!startTagExists) { startText = startText + endTags[i]; var matched = false; for (var s=startTags.length - 1; s >= 0; s--) { if (startTags[s].slice(0, startTags[s].indexOf(' ')).replace(/(\w)$/,'$1>') == rSlash(endTags[i]) && matched == false) { cleanedTag = cleanedTag ? startTags[s] + cleanedTag : startTags[s]; matched = true; } }; } } } endText = cleanedTag && cleanedTag + endText || endText; } $this.html([ startText, '', o.expandPrefix, '', o.expandText, '', '', '', endText, '' ].join('') ); } var $thisDetails = $('span.details', this), $readMore = $('span.read-more', this); $thisDetails.hide(); $readMore.find('a').click(function() { $readMore.hide(); if (o.expandEffect === 'show' && !o.expandSpeed) { o.beforeExpand($this); $thisDetails.show(); o.afterExpand($this); delayCollapse(o, $thisDetails); } else { o.beforeExpand($this); $thisDetails[o.expandEffect](o.expandSpeed, function() { $thisDetails.css({zoom: ''}); o.afterExpand($this); delayCollapse(o, $thisDetails); }); } return false; }); if (o.userCollapse) { $this .find('span.details').append('' + o.userCollapsePrefix + '' + o.userCollapseText + ''); $this.find('span.re-collapse a').click(function() { clearTimeout(delayedCollapse); var $detailsCollapsed = $(this).parents('span.details'); reCollapse($detailsCollapsed); o.onCollapse($this, true); return false; }); } }); function reCollapse(el) { el.hide() .prev('span.read-more').show(); } function delayCollapse(option, $collapseEl) { if (option.collapseTimer) { delayedCollapse = setTimeout(function() { reCollapse($collapseEl); option.onCollapse($collapseEl.parent(), false); }, option.collapseTimer ); } } function rSlash(rString) { return rString.replace(/\//,''); } }; // plugin defaults $.fn.expander.defaults = { slicePoint: 100, // the number of characters at which the contents will be sliced into two parts. // Note: any tag names in the HTML that appear inside the sliced element before // the slicePoint will be counted along with the text characters. widow: 4, // a threshold of sorts for whether to initially hide/collapse part of the element's contents. // If after slicing the contents in two there are fewer words in the second part than // the value set by widow, we won't bother hiding/collapsing anything. expandText: 'read more', // text displayed in a link instead of the hidden part of the element. // clicking this will expand/show the hidden/collapsed text expandPrefix: '… ', collapseTimer: 0, // number of milliseconds after text has been expanded at which to collapse the text again expandEffect: 'fadeIn', expandSpeed: '', // speed in milliseconds of the animation effect for expanding the text userCollapse: true, // allow the user to re-collapse the expanded text. userCollapseText: '[collapse expanded text]', // text to use for the link to re-collapse the text userCollapsePrefix: ' ', beforeExpand: function($thisEl) {}, afterExpand: function($thisEl) {}, onCollapse: function($thisEl, byUser) {} }; })(jQuery); /* * Front Slide Panel * @author Alexander Farkas * v. 1.21 */ (function($) { if(!document.defaultView || !document.defaultView.getComputedStyle){ // IE6-IE8 var oldCurCSS = jQuery.curCSS; jQuery.curCSS = function(elem, name, force){ if(name === 'background-position'){ name = 'backgroundPosition'; } if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){ return oldCurCSS.apply(this, arguments); } var style = elem.style; if ( !force && style && style[ name ] ){ return style[ name ]; } return oldCurCSS(elem, 'backgroundPositionX', force) +' '+ oldCurCSS(elem, 'backgroundPositionY', force); }; } var oldAnim = $.fn.animate; $.fn.animate = function(prop){ if('background-position' in prop){ prop.backgroundPosition = prop['background-position']; delete prop['background-position']; } if('backgroundPosition' in prop){ prop.backgroundPosition = '('+ prop.backgroundPosition; } return oldAnim.apply(this, arguments); }; function toArray(strg){ strg = strg.replace(/left|top/g,'0px'); strg = strg.replace(/right|bottom/g,'100%'); strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2"); var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/); return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]]; } $.fx.step. backgroundPosition = function(fx) { if (!fx.bgPosReady) { var start = $.curCSS(fx.elem,'backgroundPosition'); if(!start){//FF2 no inline-style fallback start = '0px 0px'; } start = toArray(start); fx.start = [start[0],start[2]]; var end = toArray(fx.options.curAnim.backgroundPosition); fx.end = [end[0],end[2]]; fx.unit = [end[1],end[3]]; fx.bgPosReady = true; } //return; var nowPosX = []; nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0]; nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1]; fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1]; }; })(jQuery);