﻿// OPENS EXTERNAL LINKS IN NEW WINDOW/TAB
function externalLinks() {
	 if (!document.getElementsByTagName) return;
	 var anchors = document.getElementsByTagName("a");
	 for (var i=0; i<anchors.length; i++) {
	   var anchor = anchors[i];
	   if (anchor.getAttribute("href") &&
		   anchor.getAttribute("rel") == "external")
		 anchor.target = "_blank";
	 }
}
window.onload = externalLinks;

/* ---------------------------------------------------------------------------------------------------- */
 /* jQuery-Plugin "toggleElements"
 * Version: 1.3, 11.09.2007
 * by Andreas Eberhard, andreas.eberhard@gmail.com | http://jquery.andreaseberhard.de/
 * Copyright (c) 2007 Andreas Eberhard
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 */

var toggleElements_animating = false;
(function($){jQuery.fn.toggleElements=function(settings){settings=jQuery.extend({fxAnimation:"slide",fxSpeed:"normal",className:"toggler",removeTitle:true,showTitle:false,onClick:null,onHide:null,onShow:null},settings);var onClick=settings.onClick,onHide=settings.onHide,onShow=settings.onShow;if((settings.fxAnimation!='slide')&&(settings.fxAnimation!='show')&&(settings.fxAnimation!='fade'))
settings.fxAnimation='slide';this.each(function(){if(jQuery(this).attr('class').indexOf("opened")==-1){jQuery(this).hide();}});this.each(function(){wtitle='';wlinktext=jQuery(this).attr('title');if(settings.showTitle==true)wtitle=wlinktext;if(settings.removeTitle==true)jQuery(this).attr('title','');if(jQuery(this).attr('class').indexOf("opened")!=-1){jQuery(this).before('<a class="'+settings.className+' '+settings.className+'-opened" href="#" title="'+wtitle+'">'+wlinktext+'</a>');jQuery(this).addClass(settings.className+'-c-opened');}else{jQuery(this).before('<a class="'+settings.className+' '+settings.className+'-closed" href="#" title="'+wtitle+'">'+wlinktext+'</a>');jQuery(this).addClass(settings.className+'-c-closed');}
jQuery(this).prev('a.'+settings.className).click(function(){if(toggleElements_animating)return false;thelink=this;jQuery(thelink)[0].blur();if(thelink.animating||toggleElements_animating)return false;toggleElements_animating=true;thelink.animating=true;if(typeof onClick=='function'&&onClick(thelink)===false){toggleElements_animating=false;thelink.animating=false;return false;}
if(jQuery(this).next().css('display')=='block'){jQuery(this).next().each(function(){if(settings.fxAnimation=='slide')jQuery(this).slideUp(settings.fxSpeed,function(){jQuery.toggleElementsHidden(this,settings.className,onHide,thelink);});if(settings.fxAnimation=='show')jQuery(this).hide(settings.fxSpeed,function(){jQuery.toggleElementsHidden(this,settings.className,onHide,thelink);});if(settings.fxAnimation=='fade')jQuery(this).fadeOut(settings.fxSpeed,function(){jQuery.toggleElementsHidden(this,settings.className,onHide,thelink);});});}else{jQuery(this).next().each(function(){if(settings.fxAnimation=='slide')jQuery(this).slideDown(settings.fxSpeed,function(){jQuery.toggleElementsShown(this,settings.className,onShow,thelink);});if(settings.fxAnimation=='show')jQuery(this).show(settings.fxSpeed,function(){jQuery.toggleElementsShown(this,settings.className,onShow,thelink);});if(settings.fxAnimation=='fade')jQuery(this).fadeIn(settings.fxSpeed,function(){jQuery.toggleElementsShown(this,settings.className,onShow,thelink);});});}
return false;});});};jQuery.toggleElementsHidden=function(el,cname,onHide,thelink){jQuery(el).prev('a.'+cname).removeClass(cname+'-opened').addClass(cname+'-closed').blur();if(typeof onHide=='function')onHide(this);jQuery(el).removeClass(cname+'-c-opened').addClass(cname+'-c-closed');toggleElements_animating=false;thelink.animating=false;};jQuery.toggleElementsShown=function(el,cname,onShow,thelink){jQuery(el).prev('a.'+cname).removeClass(cname+'-closed').addClass(cname+'-opened').blur();if(typeof onShow=='function')onShow(this);jQuery(el).removeClass(cname+'-c-closed').addClass(cname+'-c-opened');toggleElements_animating=false;thelink.animating=false;};})(jQuery);

/* ---------------------------------------------------------------------------------------------------- */
/* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* @author    Brian Cherne <brian@cherne.net> */

(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);

/* ---------------------------------------------------------------------------------------------------- */
// jQuery Right-Click Plugin
// Version 1.01
// Cory S.N. LaViska
// A Beautiful Site (http://abeautifulsite.net/)
// 20 December 2008
// Visit http://abeautifulsite.net/notebook/68 for more information
// License: This plugin is dual-licensed under the GNU General Public License and the MIT License
// and is copyright 2008 A Beautiful Site, LLC. 

if(jQuery)(function(){$.extend($.fn,{rightClick:function(handler){$(this).each(function(){$(this).mousedown(function(e){var evt=e;$(this).mouseup(function(){$(this).unbind('mouseup');if(evt.button==2){handler.call($(this),evt);return false;}else{return true;}});});$(this)[0].oncontextmenu=function(){return false;}});return $(this);},rightMouseDown:function(handler){$(this).each(function(){$(this).mousedown(function(e){if(e.button==2){handler.call($(this),e);return false;}else{return true;}});$(this)[0].oncontextmenu=function(){return false;}});return $(this);},rightMouseUp:function(handler){$(this).each(function(){$(this).mouseup(function(e){if(e.button==2){handler.call($(this),e);return false;}else{return true;}});$(this)[0].oncontextmenu=function(){return false;}});return $(this);},noContext:function(){$(this).each(function(){$(this)[0].oncontextmenu=function(){return false;}});return $(this);}});})(jQuery);


/* ---------------------------------------------------------------------------------------------------- */
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * $LastChangedDate: 2007-07-22 01:45:56 +0200 (Son, 22 Jul 2007) $
 * $Rev: 2447 $
 * Version 2.1.1 */
 
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);


/* ---------------------------------------------------------------------------------------------------- */
/* jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=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);

/* ---------------------------------------------------------------------------------------------------- */
/* jQuery.smoothDivScroll - Smooth div scrolling using jQuery.
* This plugin is for turning a set of HTML elements's into a smooth scrolling area.
* Copyright (c) 2009 Thomas Kahn - thomas.kahn(at)karnhuset(dot)net
* This plugin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
* This plugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details. <http://www.gnu.org/licenses/>.
* Date: 2009-07-05
* @author Thomas Kahn
* @version 0.9 */

(function($){jQuery.fn.smoothDivScroll=function(options){var defaults={scrollingHotSpotLeft:"div.scrollingHotSpotLeft",scrollingHotSpotRight:"div.scrollingHotSpotRight",scrollWrapper:"div.scrollWrapper",scrollableArea:"div.scrollableArea",hiddenOnStart:false,ajaxContentURL:"",countOnlyClass:"",scrollingSpeed:25,mouseDownSpeedBooster:3,autoScroll:"",autoScrollDirection:"right",autoScrollSpeed:1,pauseAutoScroll:"",visibleHotSpots:"",hotSpotsVisibleTime:5,startAtElementId:""};options=$.extend(defaults,options);return this.each(function(){var $mom=$(this);if(options.ajaxContentURL.length!==0){$mom.scrollableAreaWidth=0;$mom.find(options.scrollableArea).load((options.ajaxContentURL),function(){$mom.find(options.scrollableArea).children((options.countOnlyClass)).each(function(){$mom.scrollableAreaWidth=$mom.scrollableAreaWidth+$(this).outerWidth(true);});$mom.find(options.scrollableArea).css("width",($mom.scrollableAreaWidth+"px"));if(options.hiddenOnStart){$mom.hide();}
windowIsResized();setHotSpotHeightForIE();});}
var scrollXpos;var booster;var motherElementOffset=$mom.offset().left;var hotSpotWidth=0;booster=1;var hasExtended=false;$(window).one("load",function(){if(options.ajaxContentURL.length===0){$mom.scrollableAreaWidth=0;$mom.tempStartingPosition=0;$mom.find(options.scrollableArea).children((options.countOnlyClass)).each(function(){if((options.startAtElementId.length!==0)&&(($(this).attr("id"))==options.startAtElementId)){$mom.tempStartingPosition=$mom.scrollableAreaWidth;}
$mom.scrollableAreaWidth=$mom.scrollableAreaWidth+$(this).outerWidth(true);});$mom.find(options.scrollableArea).css("width",$mom.scrollableAreaWidth+"px");if(options.hiddenOnStart){$mom.hide();}}
$mom.find(options.scrollWrapper).scrollLeft($mom.tempStartingPosition);if(options.autoScroll!==""){$mom.autoScrollInterval=setInterval(autoScroll,6);}
if(options.autoScroll=="always")
{hideLeftHotSpot();hideRightHotSpot();}
switch(options.visibleHotSpots)
{case"always":makeHotSpotBackgroundsVisible();break;case"onstart":makeHotSpotBackgroundsVisible();$mom.hideHotSpotBackgroundsInterval=setInterval(hideHotSpotBackgrounds,(options.hotSpotsVisibleTime*1000));break;default:break;}});$mom.find(options.scrollingHotSpotRight,options.scrollingHotSpotLeft).one('mouseover',function(){if(options.autoScroll=="onstart"){clearInterval($mom.autoScrollInterval);}});$(window).bind("resize",function(){windowIsResized();});function windowIsResized(){if(!(options.hiddenOnStart))
{$mom.scrollableAreaWidth=0;$mom.find(options.scrollableArea).children((options.countOnlyClass)).each(function(){$mom.scrollableAreaWidth=$mom.scrollableAreaWidth+$(this).outerWidth(true);});$mom.find(options.scrollableArea).css("width",$mom.scrollableAreaWidth+'px');}
$mom.find(options.scrollWrapper).scrollLeft("0");var bodyWidth=$("body").innerWidth();if(options.autoScroll!=="always")
{if($mom.scrollableAreaWidth<bodyWidth)
{hideLeftHotSpot();hideRightHotSpot();}
else
{showHideHotSpots();}}}
function hideLeftHotSpot(){$mom.find(options.scrollingHotSpotLeft).hide();}
function hideRightHotSpot(){$mom.find(options.scrollingHotSpotRight).hide();}
function showLeftHotSpot(){$mom.find(options.scrollingHotSpotLeft).show();if(hotSpotWidth<=0){hotSpotWidth=$mom.find(options.scrollingHotSpotLeft).width();}}
function showRightHotSpot(){$mom.find(options.scrollingHotSpotRight).show();if(hotSpotWidth<=0){hotSpotWidth=$mom.find(options.scrollingHotSpotRight).width();}}
function setHotSpotHeightForIE()
{jQuery.each(jQuery.browser,function(i,val){if(i=="msie"&&jQuery.browser.version.substr(0,1)=="6")
{$mom.find(options.scrollingHotSpotLeft).css("height",($mom.find(options.scrollableArea).innerHeight()));$mom.find(options.scrollingHotSpotRight).css("height",($mom.find(options.scrollableArea).innerHeight()));}});}
$mom.find(options.scrollingHotSpotRight).bind('mousemove',function(e){var x=e.pageX-(this.offsetLeft+motherElementOffset);scrollXpos=Math.round((x/hotSpotWidth)*options.scrollingSpeed);if(scrollXpos===Infinity){scrollXpos=0;}});$mom.find(options.scrollingHotSpotRight).bind('mouseover',function(){if(options.autoScroll=="onstart"){clearInterval($mom.autoScrollInterval);}
$mom.rightScrollInterval=setInterval(doScrollRight,6);});$mom.find(options.scrollingHotSpotRight).bind('mouseout',function(){clearInterval($mom.rightScrollInterval);scrollXpos=0;});$mom.find(options.scrollingHotSpotRight).bind('mousedown',function(){booster=options.mouseDownSpeedBooster;});$("*").bind('mouseup',function(){booster=1;});var doScrollRight=function()
{if(scrollXpos>0){$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+(scrollXpos*booster));}
showHideHotSpots();};if(options.pauseAutoScroll=="mousedown"&&options.autoScroll=="always")
{$mom.find(options.scrollWrapper).bind('mousedown',function(){clearInterval($mom.autoScrollInterval);});$mom.find(options.scrollWrapper).bind('mouseup',function(){$mom.autoScrollInterval=setInterval(autoScroll,6);});}
else if(options.pauseAutoScroll=="mouseover"&&options.autoScroll=="always")
{$mom.find(options.scrollWrapper).bind('mouseover',function(){clearInterval($mom.autoScrollInterval);});$mom.find(options.scrollWrapper).bind('mouseout',function(){$mom.autoScrollInterval=setInterval(autoScroll,6);});}
$mom.previousScrollLeft=0;$mom.pingPongDirection="right";$mom.swapAt;$mom.getNextElementWidth=true;var autoScroll=function()
{if(options.autoScroll=="onstart"){showHideHotSpots();}
switch(options.autoScrollDirection)
{case"right":$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+options.autoScrollSpeed);break;case"left":$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()-options.autoScrollSpeed);break;case"backandforth":$mom.previousScrollLeft=$mom.find(options.scrollWrapper).scrollLeft();if($mom.pingPongDirection=="right"){$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+options.autoScrollSpeed);}
else{$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()-options.autoScrollSpeed);}
if($mom.previousScrollLeft===$mom.find(options.scrollWrapper).scrollLeft())
{if($mom.pingPongDirection=="right"){$mom.pingPongDirection="left";}
else{$mom.pingPongDirection="right";}}
break;case"endlessloop":if($mom.getNextElementWidth)
{if(options.startAtElementId!==""){$mom.swapAt=$("#"+options.startAtElementId).outerWidth();}
else{$mom.swapAt=$mom.find(options.scrollableArea).children(":first-child").outerWidth();}
$mom.getNextElementWidth=false;}
$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+options.autoScrollSpeed);if(($mom.swapAt<=$mom.find(options.scrollWrapper).scrollLeft()))
{$mom.find(options.scrollableArea).append($mom.find(options.scrollableArea).children(":first-child").clone());$mom.find(options.scrollWrapper).scrollLeft(($mom.find(options.scrollWrapper).scrollLeft()-$mom.find(options.scrollableArea).children(":first-child").outerWidth()));$mom.find(options.scrollableArea).children(":first-child").remove();$mom.getNextElementWidth=true;}
break;default:break;}};$mom.find(options.scrollingHotSpotLeft).bind('mousemove',function(e){var x=$mom.find(options.scrollingHotSpotLeft).innerWidth()-(e.pageX-motherElementOffset);scrollXpos=Math.round((x/hotSpotWidth)*options.scrollingSpeed);if(scrollXpos===Infinity)
{scrollXpos=0;}});$mom.find(options.scrollingHotSpotLeft).bind('mouseover',function(){if(options.autoScroll=="onstart"){clearInterval($mom.autoScrollInterval);}
$mom.leftScrollInterval=setInterval(doScrollLeft,6);});$mom.find(options.scrollingHotSpotLeft).bind('mouseout',function(){clearInterval($mom.leftScrollInterval);scrollXpos=0;});$mom.find(options.scrollingHotSpotLeft).bind('mousedown',function(){booster=options.mouseDownSpeedBooster;});var doScrollLeft=function()
{if(scrollXpos>0){$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()-(scrollXpos*booster));}
showHideHotSpots();};function showHideHotSpots()
{if($mom.find(options.scrollWrapper).scrollLeft()===0)
{hideLeftHotSpot();showRightHotSpot();}
else if(($mom.scrollableAreaWidth)<=($mom.find(options.scrollWrapper).innerWidth()+$mom.find(options.scrollWrapper).scrollLeft()))
{hideRightHotSpot();showLeftHotSpot();}
else
{showRightHotSpot();showLeftHotSpot();}}
function makeHotSpotBackgroundsVisible()
{$mom.find(options.scrollingHotSpotLeft).addClass("scrollingHotSpotLeftVisible");$mom.find(options.scrollingHotSpotRight).addClass("scrollingHotSpotRightVisible");}
function hideHotSpotBackgrounds()
{clearInterval($mom.hideHotSpotBackgroundsInterval);$mom.find(options.scrollingHotSpotLeft).fadeTo("slow",0.0,function(){$mom.find(options.scrollingHotSpotLeft).removeClass("scrollingHotSpotLeftVisible");});$mom.find(options.scrollingHotSpotRight).fadeTo("slow",0.0,function(){$mom.find(options.scrollingHotSpotRight).removeClass("scrollingHotSpotRightVisible");});}});};})(jQuery);

/* ---------------------------------------------------------------------------------------------------- */
/* JQUERY COMMON */

$().ready(function() {
    
    // CHANGES CLASS OF SELECTED TEXTBOX
	$('input[type="text"]').addClass("idlefield");
	    $('input[type="text"]').focus(function() {
		$(this).removeClass("idlefield").addClass("focusfield");
		if (this.value == this.defaultValue){ 
		    this.value = '';
		}
		
		if(this.value != this.defaultValue){
		    this.select();
		}
	    });
	    $('input[type="text"]').blur(function() {
		$(this).removeClass("focusfield").addClass("idlefield");
		if ($.trim(this.value) == ''){
		    this.value = (this.defaultValue ? this.defaultValue : '');
		}
	 });
	 
	 //BLOCK GALLERY
    $(document).ready(function() {
        $(".gallery").noContext();
    });
	
});
