/*################################### Start jquery.advanced-panorama.js  ###############################*/
(function($){
$.fn.advancedpanorama=function(options){
this.each(function(){
var settings={
viewport_width: 600,
speed: 20000,
direction: 'left',
control_display: 'auto',
start_position: 0}
var panoViewport=$(this)
var panoContainer=panoViewport.find('.panorama-container')
panoContainer.attr("id","panorama-container")
var panoImg=panoContainer.find('img')
var imgTitle=panoImg.attr('title')
if(!imgTitle)
imgTitle=panoImg.attr('alt')
var panoImgWidth=parseInt(panoImg.attr('width'))
var mapId=panoImg.attr('usemap')
var areaId=0
$('map[@name='+mapId+']').find('area').each(
function(){
switch($(this).attr("shape").toLowerCase()){
case 'rect' :
var areacoord=$(this).attr("coords")
var areaalt=$(this).attr("alt")
if(areaalt !=''){
areaalt=areaalt.replace("'","&#146;")
areaalt=areaalt.replace('"','&quot;')}
var areaclass=$(this).attr("class")
if(areaclass !='')
areaclass=" "+areaclass
var areahref=$(this).attr("rel")
var areaidfix=$(this).attr("id")
var arearelfix=$(this).attr("rel")
var areatitlefix=$(this).attr("title")
var areanamefix=$(this).attr("name")
var areacoordArray=coords_fill(areacoord)
if(arearelfix=="prettyPhoto[iframes]"){
panoContainer.append("<a class='panorama-area area"+areaId+areaclass+"' style='position: absolute;z-index:150; left: "+areacoordArray[0]+"px; top: "+areacoordArray[1]+"px; width: "+(areacoordArray[2]-areacoordArray[0])+"px; height: "+(areacoordArray[3]-areacoordArray[1])+"px;' onmouseover='javascript:area_hover("+areaId+");' onmouseout='javascript:area_out("+areaId+");"+"tooltip.hide();' href='"+areanamefix+"' id='"+areaidfix+"' rel='"+arearelfix+"' onclick=t1.Hide(this.event)  alt='"+areaalt+"'>&nbsp;</a>")}
else{
panoContainer.append("<a class='panorama-area area"+areaId+areaclass+"' style='position: absolute;z-index:150; left: "+areacoordArray[0]+"px; top: "+areacoordArray[1]+"px; width: "+(areacoordArray[2]-areacoordArray[0])+"px; height: "+(areacoordArray[3]-areacoordArray[1])+"px;' onmouseover='javascript:area_hover("+areaId+");' onmouseout='javascript:area_out("+areaId+");"+"tooltip.hide();checkSlide();' href='"+areahref+"' id='"+areaidfix+"' rel='"+arearelfix+"' onclick='javascript: if(t1.Show)t1.Show2(event,"+$(this).attr("id")+",640,130);return false;'  alt='"+areaalt+"'>&nbsp;</a>")}
if(areaidfix==4 || areaidfix==8){
$("#4").onclick=function(){if(t1.Show)t1.Show2(event,$(this).attr('id'),640,130);}
$("#8").onclick=function(){if(t1.Show)t1.Show2(event,$(this).attr('id'),640,130);}
}else{}
panoContainer.append("<a class='panorama-area area"+areaId+areaclass+"' style='position: absolute; z-index:150;left: "+(panoImgWidth+parseInt(areacoordArray[0]))+"px; top: "+areacoordArray[1]+"px; width: "+(areacoordArray[2]-areacoordArray[0])+"px; height: "+(areacoordArray[3]-areacoordArray[1])+"px;' onmouseover='javascript:area_hover("+areaId+")' onmouseout='javascript:area_out("+areaId+")' href='"+areahref+"'  alt='"+areaalt+"'>&nbsp;</a>")
areaId++
break
case 'circle' : break
case 'poly' : break}
}).remove()
<!--lightBox-->
panoContainer.find('a.panorama-area').bind('click',function(){
$(panoContainer).stop()
})
if(imgTitle){
panoViewport.append("<p class='flipv panorama-title'>"+imgTitle+"</p>")}
})}
$(document).ready(function(){
$(".panorama-viewport").advancedpanorama()
})
})(jQuery)
function coords_fill(mycoords){
var position1=0
var position2=0
var tabresult=new Array()
while((position2=mycoords.indexOf(',',position1))>=0){
tabresult.push(mycoords.substring(position1,position2))
position1=position2+1
position2=position1+1}
tabresult.push(mycoords.substring(position1))
return tabresult}
function area_hover(areaId){
tooltip.show($('.area'+areaId).attr("alt"))
$('.area'+areaId).addClass('panorama-area-hover').addClass('area'+areaId+'-hover')}
function area_out(areaId){
$('.area'+areaId).removeClass('panorama-area-hover').removeClass('area'+areaId+'-hover')}
/*################################### End jquery.advanced-panorama.js  ###############################*/
/*################################### Start functions.js  ###############################*/
function getBrowserInfo(){
var detect=navigator.userAgent.toLowerCase()
var OS,browser,version,total,thestring
if(checkIt('konqueror')){
browser="Konqueror"
OS="Linux"}
else if(checkIt('safari'))browser="Safari"
else if(checkIt('omniweb'))browser="OmniWeb"
else if(checkIt('opera'))browser="Opera"
else if(checkIt('webtv'))browser="WebTV"
else if(checkIt('icab'))browser="iCab"
else if(checkIt('msie'))browser="Internet Explorer"
else if(!checkIt('compatible')){
browser="Netscape Navigator"
version=detect.charAt(8)}
else browser="An unknown browser"
if(!version)version=detect.charAt(place+thestring.length)
if(!OS){
if(checkIt('linux'))OS="Linux"
else if(checkIt('x11'))OS="Unix"
else if(checkIt('mac'))OS="Mac"
else if(checkIt('win'))OS="Windows"
else OS="an unknown operating system"}}
function checkIt(string){
var detect=navigator.userAgent.toLowerCase()
var OS,browser,version,total,thestring
place=detect.indexOf(string)+1
thestring=string
return place}
function selectTab(id,count,name){
for(var i=0;i<=count;i++){
//var Link=document.getElementById(name+i)
//alert("#"+name+"_tab"+i)
if(id==i){
$("#"+name+i).css('display','block')
$("#"+name+"_tab"+i).addClass("selected")
}
else{
$("#"+name+i).css('display','none')
$("#"+name+"_tab"+i).removeClass("selected")
}
}	
}
function clearTab(count,name){
for(var i=0;i<=count;i++){
//var Link=document.getElementById(name+i)
//alert("#"+name+"_tab"+i)
$("#"+name+i).css('display','none')
$("#"+name+"_tab"+i).removeClass("selected")
}	
}

function SelectLink(id,count){
for(var i=1;i<=count;i++){
var Link=document.getElementById('Link'+i)
if(id==i){
Link.className="LinkSelected"}
else
Link.className="Link"}}

function showCompMenu(){
var galaryMenu=document.getElementById('galaryMenu')
galaryMenu.style.display='block'}
function HideCompMenu(){
var galaryMenu=document.getElementById('galaryMenu')
galaryMenu.style.display='none'}
function showServMenu(){
var visitorMenue=document.getElementById('visitorMenue')
window.clearTimeout(t)
visitorMenue.style.display='block'}
function HideServMenu(){
var visitorMenue=document.getElementById('visitorMenue')
visitorMenue.style.display='none'}
function showaboutMenu(){
var newsMenu=document.getElementById('newsMenu')
newsMenu.style.display='block'}
function HideaboutMenu(){
var newsMenu=document.getElementById('newsMenu')
newsMenu.style.display='none'}
function DoNothing(){
var i=i+2}
function validate(id){
var age=document.getElementById(id).value
if(age>0)
return true
else{
alert("The no of rooms must be a number")
return false}}
var dtCh="-"
var minYear=0000
var maxYear=9999
function isInteger(s){
var i
for(i=0;i<s.length;i++){
var c=s.charAt(i)
if(((c<"0")||(c>"9")))return false}
return true}
function stripCharsInBag(s,bag){
var i
var returnString=""
for(i=0;i<s.length;i++){
var c=s.charAt(i)
if(bag.indexOf(c)==-1)returnString+=c}
return returnString}
function daysInFebruary(year){
return(((year % 4==0)&&((!(year % 100==0))||(year % 400==0)))? 29 : 28)}
function DaysArray(n){
for(var i=1;i<=n;i++){
this[i]=31
if(i==4 || i==6 || i==9 || i==11){this[i]=30}
if(i==2){this[i]=29}}
return this}
function IsDate(dtStr,curDay,curMon,curYear){
var daysInMonth=DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strDay=dtStr.substring(0,pos1)
var strMonth=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if(strDay.charAt(0)=="0"&&strDay.length>1)strDay=strDay.substring(1)
if(strMonth.charAt(0)=="0"&&strMonth.length>1)strMonth=strMonth.substring(1)
for(var i=1;i<=3;i++){
if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1)}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if(pos1==-1 || pos2==-1){
alert("The date format should be : dd-mm-yyyy")
return false}
if(strMonth.length<1 || month<1 || month>12){
alert("Please enter a valid month")
return false}
if(strDay.length<1 || day<1 || day>31 ||(month==2&&day>daysInFebruary(year))|| day>daysInMonth[month]){
alert("Please enter a valid day")
return false}
if(strYear.length !=4 || year==0 || year<minYear || year>maxYear){
alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
return false}
if(dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr,dtCh))==false){
alert("Please enter a valid date")
return false}
return true}
ValidateDate=function(input,day,month,year){
var dt=input
if(IsDate(dt.value)==false){
dt.focus()
return false}
return true}
function ValidateEmailScripts(elem,error,type,id){
Email=elem.value
var Ret=Email.match(/^[a-z]([a-z0-9]|_|-|.)+@([a-z0-9]|-|_)+(\.([a-z0-9]){2,4}){1,2}$/i)
if(!type){
if(Ret==null){
alert(error)
elem.focus()
return false}
}else{
var d=document.getElementById(id)
var cross=document.getElementById(elem.id+'_cross')
if(Ret==null){
d.innerHTML=error
cross.style.display='inline'
return false
}else{
d.innerHTML=''
cross.style.display='none'}}
return true}
function compare(elem,next,error,type,id){
if(!type){
if(elem.value==next){
alert(error)
elem.focus()
return false}
}else{
var d=document.getElementById(id)
var cross=document.getElementById(elem.id+'_cross')
if(elem.value==next){
d.innerHTML=error
cross.style.display='inline'
return false
}else{
d.innerHTML=''
cross.style.display='none'}}
return true}
function isURL(elem,error,type,id){
var d=document.getElementById(id)
var cross=document.getElementById(elem.id+'_cross')
var urlStr=elem.value
if(urlStr.indexOf(" ")!=-1){
if(!type){
alert("Spaces are not allowed in a URL")
elem.focus()
}else{
d.innerHTML="Spaces are not allowed in a URL"
cross.style.display='inline'}
return false}
if(urlStr=="" || urlStr==null || urlStr=="http://"){
return true}
urlStr=urlStr.toLowerCase()
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s"+specialChars+"\]"
var atom=validChars+'+'
var urlPat=/^http:\/\/(\w*)\.([\-\+a-z0-9]*)\.(\w*)/
var matchArray=urlStr.match(urlPat)
if(matchArray==null){
if(!type){
alert("The URL seems incorrect \ncheck it begins with http://\n and it has 2 .'s")
elem.focus()
}else{
d.innerHTML="The URL seems incorrect \ncheck it begins with http://\n and it has 2 .'s"
cross.style.display='inline'}
return false}
var user=matchArray[2]
var domain=matchArray[3]
for(i=0;i<user.length;i++){
if(user.charCodeAt(i)>127){
if(!type){
alert("This domain contains invalid characters.")
elem.focus()
}else{
d.innerHTML="This domain contains invalid characters."
cross.style.display='inline'}
return false}}
for(i=0;i<domain.length;i++){
if(domain.charCodeAt(i)>127){
if(!type){
alert("This domain name contains invalid characters.")
elem.focus()
}else{
d.innerHTML="This domain name contains invalid characters."
cross.style.display='inline'}
return false}}
var atomPat=new RegExp("^"+atom+"$")
var domArr=domain.split(".")
var len=domArr.length
for(i=0;i<len;i++){
if(domArr[i].search(atomPat)==-1){
alert("The domain name does not seem to be valid.")
elem.focus()
return false}}
d.innerHTML=''
cross.style.display='none'
return true}
function highlight_wiz_Final(selected,total,menu){
document.getElementById('mail_list_area').style.display='none'
document.getElementById('write_message_area').style.display='none'
document.getElementById(menu+'_area').style.display='block'
for(i=1;i<=total;i++){
if(i<=selected){
document.getElementById(menu+i).style.background='url(images/try-bar.gif)'
if(i==selected){
document.getElementById(menu+'_step'+i).className='lighter'
document.getElementById(menu+'_'+i).className='selected'}
else{
document.getElementById(menu+'_step'+i).className='notlight'
document.getElementById(menu+'_'+i).className=''}
}else{
document.getElementById(menu+'_step'+i).className='notlight'
document.getElementById(menu+i).style.background='#7DD0FC'
document.getElementById(menu+'_'+i).className=''}}
heights()}
var bCheckNumbers=false
var bCheckUpperCase=false
var bCheckLowerCase=false
var bCheckPunctuation=false
var bCheckCompination=true
var nPasswordLifetime=365
function checkPassword(strPassword){
nCombinations=0
if(bCheckNumbers){
strCheck="0123456789"
if(doesContain(strPassword,strCheck)>0){
nCombinations+=strCheck.length}}
if(bCheckUpperCase){
strCheck="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
if(doesContain(strPassword,strCheck)>0){
nCombinations+=strCheck.length}}
if(bCheckLowerCase){
strCheck="abcdefghijklmnopqrstuvwxyz"
if(doesContain(strPassword,strCheck)>0){
nCombinations+=strCheck.length}}
if(bCheckPunctuation){
strCheck=";:-_=+\|//?^&!.@$#*()%~<>{}[]"
if(doesContain(strPassword,strCheck)>0){
nCombinations+=strCheck.length}}
var nDays=((Math.pow(nCombinations,strPassword.length)/500)/2)/86400
var nPerc=nDays/nPasswordLifetime
return nPerc}
function runPassword(strPassword,strFieldID){
nPerc=checkPassword(strPassword)
var ctlBar=document.getElementById(strFieldID+"_bar")
var ctlText=document.getElementById(strFieldID+"_text")
if(!ctlBar || !ctlText)
return
var nRound=Math.round(nPerc*100)
if(nRound<(strPassword.length*5)){
nRound+=strPassword.length*5}
if(nRound>100)
nRound=100
ctlBar.style.width=nRound+"%"
if(nRound>95){
strText="Very Secure"
strColor="#3bce08"}
else if(nRound>75){
strText="Secure"
strColor="orange"}
else if(nRound>50){
strText="Mediocre"
strColor="#ffd801"}
else{
strColor="red"
strText="Insecure"}
ctlBar.style.backgroundColor=strColor
ctlText.innerHTML="<span style='color: "+strColor+";'>"+strText+"</span>"}
function doesContain(strPassword,strCheck){
nCount=0
for(i=0;i<strPassword.length;i++){
if(strCheck.indexOf(strPassword.charAt(i))>-1){
nCount++}}
return nCount}
function getElementsByClassName(className,tag,elm){
var testClass=new RegExp("(^|\\s)"+className+"(\\s|$)")
var tag=tag || "*"
var elm=elm || document
var elements=(tag=="*"&&elm.all)? elm.all : elm.getElementsByTagName(tag)
var returnElements=[]
var current
var length=elements.length
for(var i=0;i<length;i++){
current=elements[i]
if(testClass.test(current.className)){
returnElements.push(current)}}
return returnElements}
function addClassName(elm,className){
var currentClass=elm.className
if(!new RegExp(("(^|\\s)"+className+"(\\s|$)"),"i").test(currentClass)){
elm.className=currentClass+((currentClass.length>0)? " " : "")+className}
return elm.className}
function removeClassName(elm,className){
var classToRemove=new RegExp(("(^|\\s)"+className+"(\\s|$)"),"i")
elm.className=elm.className.replace(classToRemove,"").replace(/^\s+|\s+$/g,"")
return elm.className}
function hasClass(el,c){
if(!el || !el.className.length)return
var bits=el.className.split(' '),has=false
for(var j=0;j<bits.length;j++)if(bits[j]===c)has=true
return has}
function activateThisColumn(column){
var table=document.getElementById('pricetable')
var form=document.getElementById('formcontainer')
table.style.width='200px'
var ths=table.getElementsByTagName('th')
for(var g=0;g<ths.length;g++){
removeClassName(ths[g],'on')
if(!hasClass(ths[g],'side')){
ths[g].style.display='none'
ths[g].style.width='0px'}}
var tds=table.getElementsByTagName('td')
for(var m=0;m<tds.length;m++){
removeClassName(tds[m],'on')
if(!hasClass(tds[m],'side')){
tds[m].style.display='none'
tds[m].style.width='0px'}}
var newths=getElementsByClassName(column,'th',table)
for(var h=0;h<newths.length;h++){
document.register.member.value=newths[h].innerHTML
addClassName(newths[h],'on')
newths[h].style.display=''
newths[h].style.width='103px'}
var newtds=getElementsByClassName(column,'td',table)
for(var i=0;i<newtds.length;i++){
addClassName(newtds[i],'on')
newtds[i].style.display=''
newtds[i].style.width='85px'}
form.style.display='block'}
function hideTheForm(){
var form=document.getElementById('formcontainer')
form.style.display='none'
var table=document.getElementById('pricetable')
table.style.width=''
var tds=table.getElementsByTagName('td')
for(var i=0;i<tds.length;i++){
tds[i].style.display=''
tds[i].style.width='80px'}
var ths=table.getElementsByTagName('th')
for(var k=0;k<ths.length;k++){
ths[k].style.display=''
ths[k].style.width='100px'}}
function HighlightAll(theField){
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if(document.all&&copytoclip==1){alert('all')
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="Contents highlighted and copied to clipboard!"
setTimeout("window.status=''",1800)}}
function change_menu(elem,action){
document.getElementById(elem).src='images/'+elem+'-'+action+'.gif'}
function show_prod(id,count,lang){
var i=0
var limit=count
for(i=0;i<limit;i++){
var diVrequired='prod_details_'+id
if(i==id){
var menu_required=document.getElementById(diVrequired)
if(menu_required.style.display=='none'){
document.getElementById('prod_details_'+id).style.display='block'
document.getElementById('category_'+id).className='category_active'
document.getElementById('arrow_'+id).src='images/arrow_active.gif'}
else{
document.getElementById('prod_details_'+i).style.display='none'
document.getElementById('category_'+i).className='category'
document.getElementById('arrow_'+i).src='images/arrow_'+lang+'.gif'}}
else{
document.getElementById('prod_details_'+i).style.display='none'
document.getElementById('category_'+i).className='category'
document.getElementById('arrow_'+i).src='images/arrow_'+lang+'.gif'}}}
function changeBack(id,count){
var i=0
var limit=count}
function change_bg(id){
document.getElementById('news_home_'+id).style.backgorund='#FFFCD4'}
/*################################### End functions.js  ###############################*/
/*################################### Start LoadModule.js  ###############################*/
function LoadModule(module,submodule,location,params,form){
var url="LoadModule.php"
var now=new Date()
var data="module="+module+"&submodule="+submodule
if(params)
data+="&"+params
if(form)
data+="&"+$('#'+form).serialize()
if(!location)
location='working-area'
document.getElementById(location).innerHTML="<table border='0' width='100%' height='380' align='center' ><tr valign='middle'><td height='380' align='center' valign='middle'><img valign='middle' src='../images/working.gif'></td></tr></table>"
$.ajax({
type: "POST",
url: url,
dataType: "html",
data: data,
success: function(html){
if(submodule=='print_reserv'){
my_window=window.open("","mywindow1","status=1")
my_window.document.write(html)
my_window.document.close()
my_window.print()}
else{
document.getElementById(location).innerHTML=''
$("#"+location).append(html)}}
})}
ChangeLang=function(epars){
var now=new Date()
var exitTime=now.getTime()
var pars='someParameter='+exitTime+"&"+epars
var url="changeLang.php"
var place=""
$.ajax({
type: "POST",
url: url,
data: pars,
success: function(html){
eval(html)}
})}
loginNow=function(epars){
var now=new Date()
var exitTime=now.getTime()
var pars='someParameter='+exitTime+"&"+epars
var url="loginto.php"
var place=""
$.ajax({
type: "POST",
url: url,
data: data,
success: function(html){
eval(html)}
})}
ChangeCountry=function(form){
var now=new Date()
var exitTime=now.getTime()
var pars='someParameter='+exitTime
if(form)
pars+="&"+$('#'+form).serialize()
var url="changeCountry.php"
var place=""
$.ajax({
type: "POST",
url: url,
data: pars,
success: function(html){
eval(html)}
})
function showadmin(originalRequest){
eval(originalRequest.responseText)}
function loginWaiting(){}}
/*################################### End LoadModule.js  ###############################*/
/*################################### Start IfrmTooltip.js  ###############################*/
function ToolTip(id,isAnimated,aniSpeed)
{var isInit=-1
var frm,divWidth,divHeight
var xincr=10,yincr=10
var animateToolTip=false
var html
function Init(id){
frm=document.getElementById(id)
if(frm==null)return
if((frm.style.width=="" || frm.style.height==""))
{alert("Both width and height must be set")
return;}
divWidth=parseInt(frm.style.width)
divHeight=parseInt(frm.style.height)
if(frm.style.overflow!="hidden")frm.style.overflow="hidden"
if(frm.style.display!="none")frm.style.display="none"
if(frm.style.position!="absolute")frm.style.position="absolute"
if(isAnimated&&aniSpeed>0)
{xincr=parseInt(divWidth/aniSpeed)
yincr=parseInt(divHeight/aniSpeed)
animateToolTip=true}
isInit++}
this.Show=function(e,t){
if(isInit<0)return
var newPosx,newPosy,height,width
if(typeof(document.documentElement.clientWidth)=='number'){
width=document.body.clientWidth
height=document.body.clientHeight;}
else{
width=parseInt(window.innerWidth)
height=parseInt(window.innerHeight)}
var curPosx=(e.x)?parseInt(e.x):parseInt(e.clientX)
var curPosy=(e.y)?parseInt(e.y):parseInt(e.clientY)
srcpath=document.getElementById(t).rel
frm.src=srcpath
if((curPosx+divWidth+10)<width)
newPosx=curPosx+10
else
newPosx=curPosx-divWidth
if((curPosy+divHeight)<height)
newPosy=curPosy
else
newPosy=curPosy-divHeight-10
if(window.pageYOffset)
{newPosy=newPosy+window.pageYOffset
newPosx=newPosx+window.pageXOffset;}
else
{newPosy=newPosy+document.body.scrollTop
newPosx=newPosx+document.body.scrollLeft;}
frm.style.display='block'
frm.style.top=newPosy+"px"
frm.style.left=newPosx+"px"
frm.focus()
if(animateToolTip){
frm.style.height="0px"
frm.style.width="0px"
ToolTip.animate(frm.id,divHeight,divWidth);}}
this.Show2=function(e,idnew,left,top){
var left=parseInt($("#panorama-container").css("margin-left"))+640
if(isInit<0)return
var newPosx,newPosy,height,width
if(typeof(document.documentElement.clientWidth)=='number'){
width=document.body.clientWidth
height=document.body.clientHeight;}
else{
width=parseInt(window.innerWidth)
height=parseInt(window.innerHeight)}
var curPosx=(e.x)?parseInt(e.x):parseInt(e.clientX)
var curPosy=(e.y)?parseInt(e.y):parseInt(e.clientY)
srcpath=document.getElementById(idnew).rel
frm.src=srcpath
if((curPosx+divWidth+10)<width)
newPosx=curPosx+10
else
newPosx=curPosx-divWidth
if((curPosy+divHeight)<height)
newPosy=curPosy
else
newPosy=curPosy-divHeight-10
if(window.pageYOffset)
{newPosy=newPosy+window.pageYOffset
newPosx=newPosx+window.pageXOffset;}
else
{newPosy=newPosy+document.body.scrollTop
newPosx=newPosx+document.body.scrollLeft;}
frm.style.display='block'
frm.style.top=top+"px"
frm.style.left=left+"px"
frm.focus()
if(animateToolTip){
frm.style.height="0px"
frm.style.width="0px"
ToolTip.animate(frm.id,divHeight,divWidth);}
$('#closeX').css('left',left+40)
$('#closeX').css('display','inline')}
this.Hide=function(e){
$('#closeX').css('display','none')
frm.style.display='none'
if(!animateToolTip)return
frm.style.height="0px"
frm.style.width="0px";}
ToolTip.animate=function(a,iHeight,iWidth)
{a=document.getElementById(a)
var i=parseInt(a.style.width)+xincr
var j=parseInt(a.style.height)+yincr
if(i<=iWidth)
{a.style.width=i+"px";}
else
{a.style.width=iWidth+"px";}
if(j<=iHeight)
{a.style.height=j+"px";}
else
{a.style.height=iHeight+"px";}
if(!((i>iWidth)&&(j>iHeight)))
setTimeout("ToolTip.animate('"+a.id+"',"+iHeight+","+iWidth+")",1)}
Init(id)}
/*################################### End IfrmTooltip.js  ###############################*/
/*################################### Start IfrmTooltip.js  ###############################*/
var tooltip=function(){
var id='tt'
var top=3
var left=3
var maxw=300
var speed=10
var timer=20
var endalpha=95
var alpha=0
var tt,t,c,b,h
var ie=document.all ? true : false
return{
show:function(v,w){
if(tt==null){
tt=document.createElement('div')
tt.setAttribute('id',id)
t=document.createElement('div')
t.setAttribute('id',id+'top')
c=document.createElement('div')
c.setAttribute('id',id+'cont')
b=document.createElement('div')
b.setAttribute('id',id+'bot')
tt.appendChild(t)
tt.appendChild(c)
tt.appendChild(b)
document.body.appendChild(tt)
tt.style.opacity=0
tt.style.filter='alpha(opacity=0)'
document.onmousemove=this.pos}
tt.style.display='block'
c.innerHTML=v
tt.style.width=w ? w+'px' : 'auto'
if(!w&&ie){
t.style.display='none'
b.style.display='none'
tt.style.width=tt.offsetWidth
t.style.display='block'
b.style.display='block'}
if(tt.offsetWidth>maxw){tt.style.width=maxw+'px'}
h=parseInt(tt.offsetHeight)+top
clearInterval(tt.timer)
tt.timer=setInterval(function(){tooltip.fade(1)},timer)
},
pos:function(e){
var u=ie ? event.clientY+document.documentElement.scrollTop : e.pageY
var l=ie ? event.clientX+document.documentElement.scrollLeft : e.pageX
tt.style.top=(u-h)+'px'
tt.style.left=(l+left)+'px'
},
fade:function(d){
var a=alpha
if((a !=endalpha&&d==1)||(a !=0&&d==-1)){
var i=speed
if(endalpha-a<speed&&d==1){
i=endalpha-a
}else if(alpha<speed&&d==-1){
i=a}
alpha=a+(i*d)
tt.style.opacity=alpha*.01
tt.style.filter='alpha(opacity='+alpha+')'
}else{
clearInterval(tt.timer)
if(d==-1){tt.style.display='none'}}
},
hide:function(){
clearInterval(tt.timer)
tt.timer=setInterval(function(){tooltip.fade(-1)},timer)}}
}()
/*################################### End IfrmTooltip.js  ###############################*/
/*###################################  Image Slider Js :: Start jquery.easing.1.3.js  ###############################*/
jQuery.easing['jswing']=jQuery.easing['swing']
jQuery.extend(jQuery.easing,{
def: 'easeOutQuad',
swing: function(x,t,b,c,d){
return jQuery.easing[jQuery.easing.def](x,t,b,c,d)
},
easeInQuad: function(x,t,b,c,d){
return c*(t/=d)*t+b
},
easeOutQuad: function(x,t,b,c,d){
return-c*(t/=d)*(t-2)+b
},
easeInOutQuad: function(x,t,b,c,d){
if((t/=d/2)<1)return c/2*t*t+b
return-c/2*((--t)*(t-2)-1)+b
},
easeInCubic: function(x,t,b,c,d){
return c*(t/=d)*t*t+b
},
easeOutCubic: function(x,t,b,c,d){
return c*((t=t/d-1)*t*t+1)+b
},
easeInOutCubic: function(x,t,b,c,d){
if((t/=d/2)<1)return c/2*t*t*t+b
return c/2*((t-=2)*t*t+2)+b
},
easeInQuart: function(x,t,b,c,d){
return c*(t/=d)*t*t*t+b
},
easeOutQuart: function(x,t,b,c,d){
return-c*((t=t/d-1)*t*t*t-1)+b
},
easeInOutQuart: function(x,t,b,c,d){
if((t/=d/2)<1)return c/2*t*t*t*t+b
return-c/2*((t-=2)*t*t*t-2)+b
},
easeInQuint: function(x,t,b,c,d){
return c*(t/=d)*t*t*t*t+b
},
easeOutQuint: function(x,t,b,c,d){
return c*((t=t/d-1)*t*t*t*t+1)+b
},
easeInOutQuint: function(x,t,b,c,d){
if((t/=d/2)<1)return c/2*t*t*t*t*t+b
return c/2*((t-=2)*t*t*t*t+2)+b
},
easeInSine: function(x,t,b,c,d){
return-c*Math.cos(t/d*(Math.PI/2))+c+b
},
easeOutSine: function(x,t,b,c,d){
return c*Math.sin(t/d*(Math.PI/2))+b
},
easeInOutSine: function(x,t,b,c,d){
return-c/2*(Math.cos(Math.PI*t/d)-1)+b
},
easeInExpo: function(x,t,b,c,d){
return(t==0)? b : c*Math.pow(2,10*(t/d-1))+b
},
easeOutExpo: function(x,t,b,c,d){
return(t==d)? b+c : c*(-Math.pow(2,-10*t/d)+1)+b
},
easeInOutExpo: function(x,t,b,c,d){
if(t==0)return b
if(t==d)return b+c
if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b
return c/2*(-Math.pow(2,-10*--t)+2)+b
},
easeInCirc: function(x,t,b,c,d){
return-c*(Math.sqrt(1-(t/=d)*t)-1)+b
},
easeOutCirc: function(x,t,b,c,d){
return c*Math.sqrt(1-(t=t/d-1)*t)+b
},
easeInOutCirc: function(x,t,b,c,d){
if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b
return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b
},
easeInElastic: function(x,t,b,c,d){
var s=1.70158;var p=0;var a=c
if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3
if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a)
return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b
},
easeOutElastic: function(x,t,b,c,d){
var s=1.70158;var p=0;var a=c
if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3
if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a)
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b
},
easeInOutElastic: function(x,t,b,c,d){
var s=1.70158;var p=0;var a=c
if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5)
if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a)
if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b
},
easeInBack: function(x,t,b,c,d,s){
if(s==undefined)s=1.70158
return c*(t/=d)*t*((s+1)*t-s)+b
},
easeOutBack: function(x,t,b,c,d,s){
if(s==undefined)s=1.70158
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b
},
easeInOutBack: function(x,t,b,c,d,s){
if(s==undefined)s=1.70158
if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b
},
easeInBounce: function(x,t,b,c,d){
return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b
},
easeOutBounce: function(x,t,b,c,d){
if((t/=d)<(1/2.75)){
return c*(7.5625*t*t)+b
}else if(t<(2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b
}else if(t<(2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b
}else{
return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}
},
easeInOutBounce: function(x,t,b,c,d){
if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b
return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}
})
/*################################### End jquery.easing.1.3.js  ###############################*/
/*################################### Start jquery.timers-1.1.2.js  ###############################*/
jQuery.fn.extend({
everyTime: function(interval,label,fn,times,belay){
return this.each(function(){
jQuery.timer.add(this,interval,label,fn,times,belay)
})
},
oneTime: function(interval,label,fn){
return this.each(function(){
jQuery.timer.add(this,interval,label,fn,1)
})
},
stopTime: function(label,fn){
return this.each(function(){
jQuery.timer.remove(this,label,fn)
})}
})
jQuery.event.special
jQuery.extend({
timer:{
global: [],
guid: 1,
dataKey: "jQuery.timer",
regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,
powers:{
'ms': 1,
'cs': 10,
'ds': 100,
's': 1000,
'das': 10000,
'hs': 100000,
'ks': 1000000
},
timeParse: function(value){
if(value==undefined || value==null)
return null
var result=this.regex.exec(jQuery.trim(value.toString()))
if(result[2]){
var num=parseFloat(result[1])
var mult=this.powers[result[2]] || 1
return num*mult
}else{
return value}
},
add: function(element,interval,label,fn,times,belay){
var counter=0
if(jQuery.isFunction(label)){
if(!times)
times=fn
fn=label
label=interval}
interval=jQuery.timer.timeParse(interval)
if(typeof interval !='number' || isNaN(interval)|| interval<=0)
return
if(times&&times.constructor !=Number){
belay=!!times
times=0}
times=times || 0
belay=belay || false
var timers=jQuery.data(element,this.dataKey)|| jQuery.data(element,this.dataKey,{})
if(!timers[label])
timers[label]={}
fn.timerID=fn.timerID || this.guid++
var handler=function(){
if(belay&&this.inProgress)
return
this.inProgress=true
if((++counter>times&&times !==0)|| fn.call(element,counter)===false)
jQuery.timer.remove(element,label,fn)
this.inProgress=false}
handler.timerID=fn.timerID
if(!timers[label][fn.timerID])
timers[label][fn.timerID]=window.setInterval(handler,interval)
this.global.push(element)
},
remove: function(element,label,fn){
var timers=jQuery.data(element,this.dataKey),ret
if(timers){
if(!label){
for(label in timers)
this.remove(element,label,fn)
}else if(timers[label]){
if(fn){
if(fn.timerID){
window.clearInterval(timers[label][fn.timerID])
delete timers[label][fn.timerID]}
}else{
for(var fn in timers[label]){
window.clearInterval(timers[label][fn])
delete timers[label][fn]}}
for(ret in timers[label])break
if(!ret){
ret=null
delete timers[label]}}
for(ret in timers)break
if(!ret)
jQuery.removeData(element,this.dataKey)}}}
})
jQuery(window).bind("unload",function(){
jQuery.each(jQuery.timer.global,function(index,item){
jQuery.timer.remove(item)
})
})
/*################################### End jquery.timers-1.1.2.js  ###############################*/
/*################################### Start jquery.prettyPhoto.js  ###############################*/
function AjaxPretty(url,location,width,height){
var now=new Date()
var data=""
if(!location)
location='working-area'
document.getElementById(location).innerHTML="<table border='0' width='100%' height='380' align='center' ><tr valign='middle'><td height='380' align='center' valign='middle'><img valign='middle' src='images/prettyPhoto/dark_rounded/loader.gif'></td></tr></table>"
if(height!='')
$('.pp_content').animate({'height':height},'normal')
if(width!='')
$('.pp_content').animate({'width':width},'normal')
$.ajax({
type: "POST",
url: url,
dataType: "html",
data: data,
success: function(html){
document.getElementById(location).innerHTML=''
$("#"+location).append(html)}
})}
var $pp_pic_holder
var $ppt
(function($){
$.fn.prettyPhoto=function(settings){
var doresize=true
var percentBased=false
var imagesArray=[]
var setPosition=0
var pp_contentHeight
var pp_contentWidth
var pp_containerHeight
var pp_containerWidth
var pp_type='image'
var $caller
var $scrollPos=_getScroll()
$(window).scroll(function(){$scrollPos=_getScroll();_centerPicture();})
$(window).resize(function(){_centerPicture();_resizeOverlay();})
$(document).keypress(function(e){
switch(e.keyCode){
case 37:
if(setPosition==1)return
changePicture('previous')
break
case 39:
if(setPosition==setCount)return
changePicture('next')
break
case 27:
close()
break}
})
settings=jQuery.extend({
animationSpeed: 'normal',
padding: 40,
opacity: 0.80,
showTitle: true,
allowresize: true,
counter_separator_label: '/',
theme: 'light_rounded',
callback: function(){}
},settings)
if($.browser.msie&&$.browser.version==6){
settings.theme="light_square"}
$(this).each(function(){
var hasTitle=false
var isSet=false
var setCount=0
var arrayPosition=0
imagesArray[imagesArray.length]=this
$(this).bind('click',function(){
open(this)
return false
})
})
function open(el){
$caller=$(el)
theRel=$caller.attr('rel')
galleryRegExp=/\[(?:.*)\]/
theGallery=galleryRegExp.exec(theRel)
isSet=false
setCount=0
_getFileType()
for(i=0;i<imagesArray.length;i++){
if($(imagesArray[i]).attr('rel').indexOf(theGallery)!=-1){
setCount++
if(setCount>1)isSet=true
if($(imagesArray[i]).attr('href')==$caller.attr('href')){
setPosition=setCount
arrayPosition=i}}}
_buildOverlay()
$pp_pic_holder.find('p.currentTextHolder').text(setPosition+settings.counter_separator_label+setCount)
_centerPicture()
$('#pp_full_res').hide()
$pp_pic_holder.find('.pp_loaderIcon').show()}
showimage=function(width,height,containerWidth,containerHeight,contentHeight,contentWidth,resized){
$('.pp_loaderIcon').hide()
if($.browser.opera){
windowHeight=window.innerHeight
windowWidth=window.innerWidth
}else{
windowHeight=$(window).height()
windowWidth=$(window).width()}
$pp_pic_holder.find('.pp_content').animate({'height':contentHeight},settings.animationSpeed)
projectedTop=$scrollPos['scrollTop']+((windowHeight/2)-(containerHeight/2))
if(projectedTop<0)projectedTop=0+$pp_pic_holder.find('.ppt').height()
$pp_pic_holder.animate({
'top': projectedTop,
'left':((windowWidth/2)-(containerWidth/2)),
'width': containerWidth
},settings.animationSpeed,function(){
$pp_pic_holder.width(containerWidth)
$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(height).width(width)
$pp_pic_holder.find('#pp_full_res').fadeIn(settings.animationSpeed,function(){
$(this).find('object,embed').css('visibility','visible')
})
_showContent()
if(resized)$('a.pp_expand,a.pp_contract').fadeIn(settings.animationSpeed)
})}
function _showContent(){
if(isSet&&pp_type=="image"){$pp_pic_holder.find('.pp_hoverContainer').fadeIn(settings.animationSpeed);}else{$pp_pic_holder.find('.pp_hoverContainer').hide();}
$pp_pic_holder.find('.pp_details').fadeIn(settings.animationSpeed)
if(settings.showTitle&&hasTitle){
$ppt.css({
'top' : $pp_pic_holder.offset().top-22,
'left' : $pp_pic_holder.offset().left+(settings.padding/2),
'display' : 'none'
})
$ppt.fadeIn(settings.animationSpeed)}}
function _hideContent(){
$pp_pic_holder.find('.pp_hoverContainer,.pp_details').fadeOut(settings.animationSpeed)
$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden')
$pp_pic_holder.find('#pp_full_res').fadeOut(settings.animationSpeed,function(){
$('.pp_loaderIcon').show()
_preload()
})
$ppt.fadeOut(settings.animationSpeed)}
function changePicture(direction){
if(direction=='previous'){
arrayPosition--
setPosition--
}else{
arrayPosition++
setPosition++}
if(!doresize)doresize=true
_hideContent()
$('a.pp_expand,a.pp_contract').fadeOut(settings.animationSpeed,function(){
$(this).removeClass('pp_contract').addClass('pp_expand')
})}
function close(){
$pp_pic_holder.find('object,embed').css('visibility','hidden')
$('div.pp_pic_holder,div.ppt').fadeOut(settings.animationSpeed)
$('div.pp_overlay').fadeOut(settings.animationSpeed,function(){
$('div.pp_overlay,div.pp_pic_holder,div.ppt').remove()
if($.browser.msie&&$.browser.version==6){
$('select').css('visibility','visible')}
settings.callback()
})
doresize=true}
function _checkPosition(){
if(setPosition==setCount){
$pp_pic_holder.find('a.pp_next').css('visibility','hidden')
$pp_pic_holder.find('a.pp_arrow_next').addClass('disabled').unbind('click')
}else{
$pp_pic_holder.find('a.pp_next').css('visibility','visible')
$pp_pic_holder.find('a.pp_arrow_next.disabled').removeClass('disabled').bind('click',function(){
changePicture('next')
return false
})}
if(setPosition==1){
$pp_pic_holder.find('a.pp_previous').css('visibility','hidden')
$pp_pic_holder.find('a.pp_arrow_previous').addClass('disabled').unbind('click')
}else{
$pp_pic_holder.find('a.pp_previous').css('visibility','visible')
$pp_pic_holder.find('a.pp_arrow_previous.disabled').removeClass('disabled').bind('click',function(){
changePicture('previous')
return false
})}
$pp_pic_holder.find('p.currentTextHolder').text(setPosition+settings.counter_separator_label+setCount)
$caller=(isSet)? $(imagesArray[arrayPosition]): $caller
_getFileType()
if($caller.attr('title')){
$pp_pic_holder.find('.pp_description').show().html(unescape($caller.attr('title')))
}else{
$pp_pic_holder.find('.pp_description').hide().text('')}
if($caller.find('img').attr('alt')&&settings.showTitle){
hasTitle=true
$ppt.html(unescape($caller.find('img').attr('alt')))
}else{
hasTitle=false}}
function _fitToViewport(width,height){
hasBeenResized=false
_getDimensions(width,height)
imageWidth=width
imageHeight=height
windowHeight=$(window).height()
windowWidth=$(window).width()
if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allowresize&&!percentBased){
hasBeenResized=true
notFitting=true
while(notFitting){
if((pp_containerWidth>windowWidth)){
imageWidth=(windowWidth-200)
imageHeight=(height/width)*imageWidth
}else if((pp_containerHeight>windowHeight)){
imageHeight=(windowHeight-200)
imageWidth=(width/height)*imageHeight
}else{
notFitting=false}
pp_containerHeight=imageHeight
pp_containerWidth=imageWidth}
_getDimensions(imageWidth,imageHeight)}
return{
width:imageWidth,
height:imageHeight,
containerHeight:pp_containerHeight,
containerWidth:pp_containerWidth,
contentHeight:pp_contentHeight,
contentWidth:pp_contentWidth,
resized:hasBeenResized}}
function _getDimensions(width,height){
$pp_pic_holder.find('.pp_details').width(width).find('.pp_description').width(width-parseFloat($pp_pic_holder.find('a.pp_close').css('width')))
pp_contentHeight=height+$pp_pic_holder.find('.pp_details').height()+parseFloat($pp_pic_holder.find('.pp_details').css('marginTop'))+parseFloat($pp_pic_holder.find('.pp_details').css('marginBottom'))
pp_contentWidth=width
pp_containerHeight=pp_contentHeight+$pp_pic_holder.find('.ppt').height()+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height()
pp_containerWidth=width+settings.padding}
function _getFileType(){
if($caller.attr('href').match(/youtube\.com\/watch/i)){
pp_type='youtube'
}else if($caller.attr('href').indexOf('.mov')!=-1){
pp_type='quicktime'
}else if($caller.attr('href').indexOf('.swf')!=-1){
pp_type='flash'
}else if($caller.attr('href').indexOf('iframe')!=-1){
pp_type='iframe'
}else{
pp_type='image'}}
function _centerPicture(){
if($pp_pic_holder){if($pp_pic_holder.size()==0){return;}}else{return;}
if($.browser.opera){
windowHeight=window.innerHeight
windowWidth=window.innerWidth
}else{
windowHeight=$(window).height()
windowWidth=$(window).width()}
if(doresize){
$pHeight=$pp_pic_holder.height()
$pWidth=$pp_pic_holder.width()
$tHeight=$ppt.height()
projectedTop=(windowHeight/2)+$scrollPos['scrollTop']-($pHeight/2)
if(projectedTop<0)projectedTop=0+$tHeight
$pp_pic_holder.css({
'top': projectedTop,
'left':(windowWidth/2)+$scrollPos['scrollLeft']-($pWidth/2)
})
$ppt.css({
'top' : projectedTop-$tHeight,
'left' :(windowWidth/2)+$scrollPos['scrollLeft']-($pWidth/2)+(settings.padding/2)
})}}
function _preload(){
_checkPosition()
if(pp_type=='image'){
imgPreloader=new Image()
nextImage=new Image()
if(isSet&&setPosition>setCount)nextImage.src=$(imagesArray[arrayPosition+1]).attr('href')
prevImage=new Image()
if(isSet&&imagesArray[arrayPosition-1])prevImage.src=$(imagesArray[arrayPosition-1]).attr('href')
pp_typeMarkup='<img id="fullResImage" src="" />'
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=pp_typeMarkup
$pp_pic_holder.find('.pp_content').css('overflow','hidden')
$pp_pic_holder.find('#fullResImage').attr('src',$caller.attr('href'))
imgPreloader.onload=function(){
var correctSizes=_fitToViewport(imgPreloader.width,imgPreloader.height)
imgPreloader.width=correctSizes['width']
imgPreloader.height=correctSizes['height']
showimage(imgPreloader.width,imgPreloader.height,correctSizes["containerWidth"],correctSizes["containerHeight"],correctSizes["contentHeight"],correctSizes["contentWidth"],correctSizes["resized"])}
imgPreloader.src=$caller.attr('href')
}else{
movie_width=(parseFloat(grab_param('width',$caller.attr('href'))))? grab_param('width',$caller.attr('href')): "425"
movie_height=(parseFloat(grab_param('height',$caller.attr('href'))))? grab_param('height',$caller.attr('href')): "344"
if(movie_width.indexOf('%')!=-1 || movie_height.indexOf('%')!=-1){
movie_height=($(window).height()*parseFloat(movie_height)/100)-100
movie_width=($(window).width()*parseFloat(movie_width)/100)-100
parsentBased=true
}else{
movie_height=parseFloat(movie_height)
movie_width=parseFloat(movie_width)}
if(pp_type=='quicktime'){movie_height+=13;}
correctSizes=_fitToViewport(movie_width,movie_height)
if(pp_type=='youtube'){
pp_typeMarkup='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.youtube.com/v/'+grab_param('v',$caller.attr('href'))+'" /><embed src="http://www.youtube.com/v/'+grab_param('v',$caller.attr('href'))+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"></embed></object>'
}else if(pp_type=='quicktime'){
pp_typeMarkup='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+correctSizes['height']+'" width="'+correctSizes['width']+'"><param name="src" value="'+$caller.attr('href')+'"><param name="autoplay" value="true"><param name="type" value="video/quicktime"><embed src="'+$caller.attr('href')+'" height="'+correctSizes['height']+'" width="'+correctSizes['width']+'" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>'
}else if(pp_type=='flash'){
flash_vars=$caller.attr('href')
flash_vars=flash_vars.substring($caller.attr('href').indexOf('flashvars')+10,$caller.attr('href').length)
filename=$caller.attr('href')
filename=filename.substring(0,filename.indexOf('?'))
pp_typeMarkup='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="'+filename+'?'+flash_vars+'" /><embed src="'+filename+'?'+flash_vars+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+correctSizes['width']+'" height="'+correctSizes['height']+'"></embed></object>'
}else if(pp_type=='iframe'){
movie_url=$caller.attr('href')
movie_url=movie_url.substr(0,movie_url.indexOf('iframe')-1)
pp_typeMarkup='<div class="LoadingIFrame" id="FrameBG"></div>'}
$pp_pic_holder.find('#pp_full_res')[0].innerHTML=pp_typeMarkup
eval('AjaxPretty("'+movie_url+'","FrameBG","","");')
showimage(correctSizes['width'],correctSizes['height'],correctSizes["containerWidth"],correctSizes["containerHeight"],correctSizes["contentHeight"],correctSizes["contentWidth"],correctSizes["resized"])}}
function _getScroll(){
if(self.pageYOffset){
scrollTop=self.pageYOffset
scrollLeft=self.pageXOffset
}else if(document.documentElement&&document.documentElement.scrollTop){
scrollTop=document.documentElement.scrollTop
scrollLeft=document.documentElement.scrollLeft
}else if(document.body){
scrollTop=document.body.scrollTop
scrollLeft=document.body.scrollLeft}
return{scrollTop:scrollTop,scrollLeft:scrollLeft}}
function _resizeOverlay(){
$('div.pp_overlay').css({
'height':$(document).height(),
'width':$(window).width()
})}
function _buildOverlay(){
toInject=""
toInject+="<div class='pp_overlay'></div>"
if(pp_type=='image'){
pp_typeMarkup='<img id="fullResImage" src="" />'
}else{
pp_typeMarkup=''}
toInject+='<div class="pp_pic_holder"><div class="pp_top"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div><div class="pp_content" id="pp_content"><a href="#" class="pp_expand" title="Expand the image">Expand</a><div class="pp_loaderIcon"></div><div class="pp_hoverContainer"><a class="pp_next" href="#">next</a><a class="pp_previous" href="#">previous</a></div><div id="pp_full_res">'+pp_typeMarkup+'</div><div class="pp_details clearfix"><a class="pp_close" href="#">Close</a><p class="pp_description"></p><div class="pp_nav"><a href="#" class="pp_arrow_previous">Previous</a><p class="currentTextHolder">0'+settings.counter_separator_label+'0</p><a href="#" class="pp_arrow_next">Next</a></div></div></div><div class="pp_bottom"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div></div>'
toInject+='<div class="ppt"></div>'
$('body').append(toInject)
$pp_pic_holder=$('.pp_pic_holder')
$ppt=$('.ppt')
$('div.pp_overlay').css('height',$(document).height()).bind('click',function(){
close()
})
$pp_pic_holder.css({'opacity': 0}).addClass(settings.theme)
$('a.pp_close').bind('click',function(){close();return false;})
$('a.pp_expand').bind('click',function(){
$this=$(this)
if($this.hasClass('pp_expand')){
$this.removeClass('pp_expand').addClass('pp_contract')
doresize=false
}else{
$this.removeClass('pp_contract').addClass('pp_expand')
doresize=true}
_hideContent()
$pp_pic_holder.find('.pp_hoverContainer, #pp_full_res, .pp_details').fadeOut(settings.animationSpeed,function(){
_preload()
})
return false
})
$pp_pic_holder.find('.pp_previous, .pp_arrow_previous').bind('click',function(){
changePicture('previous')
return false
})
$pp_pic_holder.find('.pp_next, .pp_arrow_next').bind('click',function(){
changePicture('next');alert('ghj')
return false
})
$pp_pic_holder.find('.pp_hoverContainer').css({
'margin-left': settings.padding/2
})
if(!isSet){
$pp_pic_holder.find('.pp_hoverContainer,.pp_nav').hide()}
if($.browser.msie&&$.browser.version==6){
$('body').addClass('ie6')
$('select').css('visibility','hidden')}
$('div.pp_overlay').css('opacity',0).fadeTo(settings.animationSpeed,settings.opacity,function(){
$pp_pic_holder.css('opacity',0).fadeIn(settings.animationSpeed,function(){
$pp_pic_holder.attr('style','left:'+$pp_pic_holder.css('left')+';top:'+$pp_pic_holder.css('top')+';')
_preload()
})
})}}
function grab_param(name,url){
name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]")
var regexS="[\\?&]"+name+"=([^&#]*)"
var regex=new RegExp(regexS)
var results=regex.exec(url)
if(results==null)
return ""
else
return results[1]}
})(jQuery)
/*################################### End jquery.prettyPhoto.js  ###############################*/
