function getUID(){var d=function(){return(1+Math.random())*4096|0};return d()+d()+d()+d()+d()+d()}
jQuery.fn.wptabs=function(d){var b,a=jQuery.extend({},jQuery.fn.wptabs.defaults,d);this.each(function(){uid=getUID();var c=jQuery(this);c.prepend('<ul class="ui-tabs-nav" />');var f=c.children(a.h3Class).wrap('<div class="ui-tabs-panel"></div>');c.find("div.ui-tabs-panel:last-child").after('<p id="jqtemp">');f.each(function(){jQuery(this).parent().append(jQuery(this).parent().nextUntil("div.ui-tabs-panel"))});c.find(".ui-tabs-panel").children(a.h3Class).each(function(){if(jQuery(this).children(a.linkAjaxClass).length!=
0){b=' href="'+jQuery(this).children(a.linkAjaxClass).attr("href")+'" title="'+jQuery(this).text()+'"';e=jQuery(this).text().replace(/\s{1,}/gm,"_");e=e.replace(/[^\-A-Za-z0-9\s_]/mg,"")}else{var e=jQuery(this).text().replace(/\s{1,}/gm,"_")+"_"+uid++;e=e.replace(/[^\-A-Za-z0-9\s_]/mg,"");b=' href="#'+e+'"'}jQuery(this).parent().parent().children("ul.ui-tabs-nav").append("<li><a "+b+">"+jQuery(this).text()+"</a></li>");jQuery(this).parent().attr("id",e);panelWidth=jQuery(this).width()-20;jQuery(this).find("img").css({width:panelWidth});
jQuery(this).find("iframe").css({width:"600px"})}).hide();if(c.find("div.ui-tabs").length==0){c.find("ul").before("<div class='ui-tabs'>");c.find(".ui-tabs").each(function(){jQuery(this).append(jQuery(this).nextUntil("p#jqtemp"))})}tabsobj={};if(a.effect=="slideDown")tabsobj.effect={height:"toggle",speed:a.effectSpeed};else if(a.effect=="fadeIn")tabsobj.effect={opacity:"toggle",speed:a.effectSpeed};if(a.cookies)tabsobj.cookie={expires:30};var g=c.children(".ui-tabs").tabs(tabsobj);jQuery("ul.ui-tabs-nav").each(function(){jQuery("li:first",
this).addClass("first-li");jQuery("li:last",this).addClass("last-li")});a.alwaysRotate!="disable"&&jQuery(this+"[class*=tab-rotate]").each(function(){rotateSpeed=jQuery(this).attr("class").match(/tab-rotate-(.*)/,"$1");if(rotateSpeed!=null){if(rotateSpeed[1].match(/(\d){1,2}s/,"$1"))rotateSpeed[1]=rotateSpeed[1].replace(/s$/,"")*1E3;rotateSpeed=rotateSpeed[1];alwaysRotate=a.alwaysRotate=="always"?true:false}jQuery(this).children(".ui-tabs").tabs("rotate",rotateSpeed,alwaysRotate)});if(a.topNav||a.bottomNav){c.find("div.ui-tabs-panel").each(function(e){!a.topNav||
jQuery(this).prepend('<div class="tab-top-nav" />');!a.bottomNav||jQuery(this).append('<div class="tab-bottom-nav" />');var h=jQuery(this).parent().children(".ui-tabs-panel").length-1;if(e!=0){!a.topNav||jQuery(this).children(".tab-top-nav").prepend('<a href="#" class="backward prev-tab">'+a.tabPrevText+"</a>");!a.bottomNav||jQuery(this).children(".tab-bottom-nav").append('<a href="#" class="backward prev-tab">'+a.tabPrevText+"</a>")}if(e!=h){!a.topNav||jQuery(this).children(".tab-top-nav").append('<a href="#" class="forward next-tab">'+
a.tabNextText+"</a>");!a.bottomNav||jQuery(this).children(".tab-bottom-nav").append('<a href="#" class="forward next-tab">'+a.tabNextText+"</a>")}});jQuery("a.forward, a.backward").click(function(){var e=c.find(".ui-tabs").tabs("option","selected");e=jQuery(this).hasClass("backward")?e-1:e+1;g.tabs("select",e);return false})}g.tabs("option","disabled",false);if(a.position=="bottom"||jQuery(this).hasClass("tabs-bottom")){jQuery("ul.ui-tabs-nav",this).each(function(){jQuery(this).appendTo(jQuery(this).parent()).addClass("ul-bottom")});
c.children(".ui-tabs").addClass("bottom-tabs").children(".ui-tabs-panel").each(function(){jQuery(this).addClass("bottom-tabs")})}typeof WPUIOpts!="undefined"&&c.append('<a class="thickbox cap-icon-link" title="" href="http://kav.in"><img src="'+wpUIOpts.pluginUrl+'/images/cquest.png" alt="Cap" /></a>')});return this};
jQuery.fn.wptabs.defaults={h3Class:"h3.wp-tab-title",linkAjaxClass:"a.wp-tab-load",topNav:typeof wpUIOpts!="undefined"&&wpUIOpts.topNav=="on"?true:false,bottomNav:typeof wpUIOpts!="undefined"&&wpUIOpts.bottomNav=="on"?true:false,position:"top",navStyle:typeof wpUIOpts!="undefined"?wpUIOpts.tabsLinkClass:"",effect:typeof wpUIOpts!="undefined"?wpUIOpts.tabsEffect:"",effectSpeed:typeof wpUIOpts!="undefined"?wpUIOpts.effectSpeed:"",alwaysRotate:typeof wpUIOpts!="undefined"?wpUIOpts.alwaysRotate:"",tabPrevText:typeof wpUIOpts!=
"undefined"&&wpUIOpts.tabPrevText!=""?wpUIOpts.tabPrevText:"&laquo; Previous",tabNextText:typeof wpUIOpts!="undefined"&&wpUIOpts.tabNextText!=""?wpUIOpts.tabNextText:"Next &raquo;",cookies:typeof wpUIOpts!="undefined"&&wpUIOpts.cookies=="on"?true:false};
jQuery.fn.wpaccord=function(d){var b,a,c,f=jQuery.extend({},jQuery.fn.wpaccord.defaults,d);this.each(function(){var g=jQuery(this);g.append('<p id="jqtemp" />');g.find("p, br").filter(function(){return jQuery.trim(jQuery(this).text())===""}).remove();b=g.find("h3:first").wrap('<div class="accordion">');b.each(function(){jQuery(this).parent().append(jQuery(this).parent().nextUntil("p#jqtemp"))});g.find(f.h3Class).each(function(){a=jQuery(this).children(f.linkAjaxClass);if(a.length!=0){c=a.attr("href");
a.parent().after("<div></div>");jQuery(this).next().load(wpUIOpts.wpUrl+"/"+c);jQuery(this).text(jQuery(this).children().text())}});accordOpts={};accordOpts.autoHeight=f.autoHeight?true:false;if(f.collapse){accordOpts.collapsible=true;accordOpts.active=false}accordOpts.animated=f.easing;jQuery(".accordion").accordion(accordOpts);jQuery(".accordion h3.ui-accordion-header:last").addClass("last-child");g.find("p#jqtemp").remove()})};
jQuery.fn.wpaccord.defaults={h3Class:"h3.wp-tab-title",linkAjaxClass:"a.wp-tab-load",effect:typeof wpUIOpts!="undefined"?wpUIOpts.accordEffect:"",autoHeight:typeof wpUIOpts!="undefined"&&wpUIOpts.accordAutoHeight=="on"?true:false,collapse:typeof wpUIOpts!="undefined"&&wpUIOpts.accordCollapsible=="on"?true:false,easing:typeof wpUIOpts!="undefined"?wpUIOpts.accordEasing:""};
jQuery.fn.wpspoiler=function(d){var b,a;b=jQuery.extend({},jQuery.fn.wpspoiler.defaults,d);return this.each(function(){var c=jQuery(this);c.addClass("ui-collapsible");c.children(b.headerClass).each(function(){jQuery(this).append('<span class="'+b.spanClass.replace(/\./,"")+'" style="float:right"></span>').find(b.spanClass).css({fontSize:"0.786em"});jQuery(this).click(function(){jQuery(this).delay(2E3).toggleClass("ui-state-active");b.fade=jQuery(this).hasClass("fade-false")?false:true;b.slide=jQuery(this).hasClass("slide-false")?
false:true;aniOpts={};if(b.fade)aniOpts.opacity="toggle";if(b.slide)aniOpts.height="toggle";if(b.slide||b.fade){if(jQuery(this+"[class*=speed-]").length)speed=(animSpeed=jQuery(this).attr("class").match(/speed-(.*)\s|\"/,"$1"))?animSpeed[1]:b.speed;jQuery(this).next("div.ui-collapsible-content").animate(aniOpts,b.speed)}else jQuery(this).next("div.ui-collapsible-content").toggle(b.speed);a=jQuery(this).children(b.spanClass).text();jQuery(this).find(b.spanClass).text(a==b.showText?b.hideText:b.showText)}).next().hide().prev().find(b.spanClass).text(b.showText)})})};
jQuery.fn.wpspoiler.defaults={hideText:typeof wpUIOpts!="undefined"?wpUIOpts.spoilerHideText:"",showText:typeof wpUIOpts!="undefined"?wpUIOpts.spoilerShowText:"",fade:true,slide:true,speed:600,spanClass:".toggle_text",headerClass:"h3.ui-collapsible-header"};
jQuery.fn.extend({tooltips:function(d){var b=$.extend({background:"#000",gradient:"",bordercolor:"#888",textcolor:"#EEE",shadow:"0 1px 3px #000",effect:"fade",forceUse:false,disableOn:""},d);return this.each(function(){var a=jQuery(this);attrName=a.is("img")?"alt":"title";a.not(b.disableOn).mouseover(function(){getAttr=a.attr(attrName);if(getAttr.length==0)if(b.useValue==true)getAttr=a.text();else return;a.append('<div id="toolztip"><div class="tooltip-arrow-up"></div>'+getAttr+'<div class="tooltip-arrow-down"></div></div>');
jQuery("#toolztip").css({backgroundImage:b.background,borderColor:b.bordercolor,color:b.textcolor}).attr("style","box-shadow: "+b.shadow+"; -moz-border-shadow:"+b.shadow+";").attr("style","background-image: "+b.gradient+"; background-image:"+b.gradient+";");jQuery("#toolztip div.tooltip-arrow-down").hide();if(b.effect=="slide")jQuery("#tooltip").slideDown("500");else b.tipEffect=="fade"&&jQuery("#tooltip").fadeIn(500)}).mousemove(function(){}).mouseleave(function(){a.find("#toolztip").remove()})})}});
jQuery.cookie=function(d,b,a){if(arguments.length>1&&(b===null||typeof b!=="object")){a=jQuery.extend({},a);if(b===null)a.expires=-1;if(typeof a.expires==="number"){var c=a.expires,f=a.expires=new Date;f.setDate(f.getDate()+c)}return document.cookie=[encodeURIComponent(d),"=",a.raw?String(b):encodeURIComponent(String(b)),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}a=b||{};f=a.raw?function(g){return g}:
decodeURIComponent;return(c=RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(c[1]):null};

