1// JavaScript Document 2function scrollToAnchor(aid){ 3 "use strict"; 4 var aTag = $("a[name='"+ aid +"']"); 5 $('html,body').animate({scrollTop: aTag.offset().top},'slow'); 6} 7 8jQuery(document).ready(function($){ 9 10 "use strict"; 11 12 /* ---------------------------------------------------------------------- */ 13 /* PreLoader 14 /* ---------------------------------------------------------------------- */ 15 setTimeout(function(){ 16 $('body').addClass('loaded'); 17 }, 5); 18 19 /* ---------------------------------------------------------------------- */ 20 /* Search Script 21 /* ---------------------------------------------------------------------- */ 22 $(".search-fld").on('click',function(){ 23 if($(this).hasClass('minus')){ 24 $(this).toggleClass("plus minus"); 25 $('.search-area').fadeOut(); 26 }else{ 27 $('.search-area').fadeIn(); 28 $(this).toggleClass("minus plus"); 29 } 30 }); 31 32 /* ---------------------------------------------------------------------- */ 33 /* Slider inside Tabs Script 34 /* ---------------------------------------------------------------------- */ 35 $('a[href="#profile"]').one('shown.bs.tab', function (e) { 36 $('.bxslider-1').bxSlider(); 37 }); 38 $('a[href="#messages"]').one('shown.bs.tab', function (e) { 39 $('.bxslider-2').bxSlider(); 40 }); 41 $('a[href="#settings"]').one('shown.bs.tab', function (e) { 42 $('.bxslider-3').bxSlider(); 43 }); 44 $('a[href="#settings2"]').one('shown.bs.tab', function (e) { 45 $('.bxslider-4').bxSlider(); 46 }); 47 48 $('a[href="#cat2"]').one('shown.bs.tab', function (e) { 49 $('.bxslider-2').bxSlider(); 50 }); 51 $('a[href="#cat3"]').one('shown.bs.tab', function (e) { 52 $('.bxslider-3').bxSlider(); 53 }); 54 $('a[href="#cat4"]').one('shown.bs.tab', function (e) { 55 $('.bxslider-4').bxSlider(); 56 }); 57 58 59 60 /* ---------------------------------------------------------------------- */ 61 /* Back To TOp Script 62 /* ---------------------------------------------------------------------- */ 63 $(window).scroll(function(){ 64 if ($(this).scrollTop() > 100) { 65 $('.back-to-top').css('opacity','1'); 66 } else { 67 $('.back-to-top').css('opacity','0'); 68 } 69 }); 70 71 /* ---------------------------------------------------------------------- */ 72 /* Back to Top Script 73 /* ---------------------------------------------------------------------- */ 74 $('.back-to-top a').on('click',function(){ 75 $('html, body').animate({scrollTop : 0},800); 76 return false; 77 }); 78 79 80 81 /* ---------------------------------------------------------------------- */ 82 /* PrettyPhoto Script 83 /* ---------------------------------------------------------------------- */ 84 if($("[rel^='prettyPhoto']").length){ 85 $("[rel^='prettyPhoto']").prettyPhoto(); 86 } 87 88 /* ---------------------------------------------------------------------- */ 89 /* Tooltip Script 90 /* ---------------------------------------------------------------------- */ 91 if($("[data-toggle='tooltip']").length){ 92 $('[data-toggle="tooltip"]').tooltip(); 93 } 94 95 /* ---------------------------------------------------------------------- */ 96 /* Owl Slider Owl Demo Script 97 /* ---------------------------------------------------------------------- */ 98 if($("#owl-demo").length){ 99 100 var owl = $("#owl-demo"); 101 102 owl.owlCarousel({ 103 itemsCustom : [ 104 [0, 2], 105 [450, 2], 106 [700, 3], 107 [1000, 5], 108 [1200, 5], 109 [1360, 6], 110 ], 111 navigation : true 112 }); 113 114 } 115 116 /* ---------------------------------------------------------------------- */ 117 /* Owl BLog Script 118 /* ---------------------------------------------------------------------- */ 119 if($(".owl-blog").length){ 120 121 var owl = $(".owl-blog"); 122 123 owl.owlCarousel({ 124 itemsCustom : [ 125 [0, 1], 126 [450, 1], 127 [700, 3], 128 [1000, 4], 129 [1200, 4], 130 [1360, 5], 131 ], 132 navigation : true 133 }); 134 135 } 136 137 /* ---------------------------------------------------------------------- */ 138 /* Owl Slider Release Script 139 /* ---------------------------------------------------------------------- */ 140 if($(".owl-release").length){ 141 142 var owl = $(".owl-release"); 143 144 owl.owlCarousel({ 145 itemsCustom : [ 146 [0, 1], 147 [450, 1], 148 [700, 2], 149 [1000, 4], 150 [1200, 4], 151 [1360, 5], 152 ], 153 navigation : true 154 }); 155 156 } 157 158 /* ---------------------------------------------------------------------- */ 159 /* Owl Slider Library Script 160 /* ---------------------------------------------------------------------- */ 161 if($(".owl-library").length){ 162 163 var owl = $(".owl-library"); 164 165 owl.owlCarousel({ 166 itemsCustom : [ 167 [0, 1], 168 [450, 1], 169 [700, 3], 170 [1000, 4], 171 [1200, 4], 172 [1360, 3], 173 ], 174 navigation : true 175 }); 176 177 } 178 179 180 /* ---------------------------------------------------------------------- */ 181 /* Testimonial Slider Script 182 /* ---------------------------------------------------------------------- */ 183 if($(".owl-testimonials").length){ 184 185 var owl = $(".owl-testimonials"); 186 187 owl.owlCarousel({ 188 itemsCustom : [ 189 [0, 1], 190 [450, 1], 191 [700, 1], 192 [1000, 2], 193 [1200, 2], 194 [1360, 2],
195 ], 196 navigation : true 197 }); 198 } 199 200 201 /* ---------------------------------------------------------------------- */ 202 /* Accordion Script 203 /* ---------------------------------------------------------------------- */ 204 if($("#ex2").length){ 205 $("#ex2").slider({}); 206 } 207 208 /* ---------------------------------------------------------------------- */ 209 /* Accordion Script 210 /* ---------------------------------------------------------------------- */ 211 if($('.accordion').length){ 212 //custom animation for open/close 213 $.fn.slideFadeToggle = function(speed, easing, callback) { 214 return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); 215 }; 216 217 $('.accordion').accordion({ 218 defaultOpen: '#section2', 219 cookieName: 'nav', 220 speed: 'slow', 221 animateOpen: function (elem, opts) { //replace the standard slideUp with custom function 222 elem.next().stop(true, true).slideFadeToggle(opts.speed); 223 }, 224 animateClose: function (elem, opts) { //replace the standard slideDown with custom function 225 elem.next().stop(true, true).slideFadeToggle(opts.speed); 226 } 227 }); 228 } 229 230 /* ---------------------------------------------------------------------- */ 231 /* Select Menu Script 232 /* ---------------------------------------------------------------------- */ 233 if($(".select-menu").length){ 234 $(".select-menu").selectbox();{ 235 } 236 } 237 238 239 /* ---------------------------------------------------------------------- */ 240 /* Range Script 241 /* ---------------------------------------------------------------------- */ 242 if($(".range").length){ 243 $(".range").slider(); 244 $(".range").on("slide", function(slideEvt) { 245 $(".range-slider").text(slideEvt.value); 246 }); 247 } 248 249 /* ---------------------------------------------------------------------- */ 250 /* Range Script 251 /* ---------------------------------------------------------------------- */ 252 if($(".range2").length){ 253 $(".range2").slider(); 254 $(".range2").on("slide", function(slideEvt) { 255 $(".range-slider2").text(slideEvt.value); 256 }); 257 } 258 259 /* ---------------------------------------------------------------------- */ 260 /* BxSlider Script 261 /* ---------------------------------------------------------------------- */ 262 if($(".bxslider").length){ 263 $('.bxslider').bxSlider(); 264 } 265 266 /* ---------------------------------------------------------------------- */ 267 /* BxSlider2 Script 268 /* ---------------------------------------------------------------------- */ 269 if($(".bxslider2").length){ 270 $('.bxslider2').bxSlider({ 271 mode: 'fade', 272 auto: true, 273 autoControls: true, 274 pause: 2000 275 }); 276 } 277 278 /* ---------------------------------------------------------------------- */ 279 /* BxSlider-thumbs Script 280 /* ---------------------------------------------------------------------- */ 281 if($(".bxslider-thums").length){ 282 $('.bxslider-thums').bxSlider({ 283 pagerCustom: '#bx-pager' 284 }); 285 } 286 287 /* ---------------------------------------------------------------------- */ 288 /* Counter Script 289 /* ---------------------------------------------------------------------- */ 290 if($(".counter").length){ 291 $('.counter').counterUp({ 292 delay: 10, 293 time: 1000 294 295 }); 296 } 297 298 /* ---------------------------------------------------------------------- */ 299 /* Default CountDown Script 300 /* ---------------------------------------------------------------------- */ 301 if($("#defaultCountdown").length){ 302 $(function () { 303 var austDay = new Date(); 304 austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); 305 $('#defaultCountdown').countdown({until: austDay}); 306 $('#year').text(austDay.getFullYear()); 307 }); 308 } 309 310 /* ---------------------------------------------------------------------- */ 311 /* Google Map Script 312 /* ---------------------------------------------------------------------- */ 313 var map; 314 function initMap() { 315 map = new google.maps.Map(document.getElementById('map'), { 316 center: {lat: 31.4830844, lng: 74.3068658}, 317 zoom: 8 318 }); 319 } 320 321 /* ---------------------------------------------------------------------- */ 322 /* Tabs Script 323 /* ---------------------------------------------------------------------- */ 324 if($("#tabs").length){ 325 $('#tabs').tab(); 326 } 327 328 /* ---------------------------------------------------------------------- */ 329 /* DL Responsive Menu 330 /* ---------------------------------------------------------------------- */ 331 if(typeof($.fn.dlmenu) == 'function'){ 332 $('#kode-responsive-navigation').each(function(){ 333 $(this).find('.dl-submenu').each(function(){ 334 if( $(this).siblings('a').attr('href') && $(this).siblings('a').attr('href') != '#' ){ 335 var parent_nav = $('<li class="menu-item kode-parent-menu"></li>'); 336 parent_nav.append($(this).siblings('a').clone()); 337 338 $(this).prepend(parent_nav); 339 } 340 }); 341 $(this).dlmenu(); 342 }); 343 } 344 345 /* ---------------------------------------------------------------------- */ 346 /* Contact Form 347 /* ---------------------------------------------------------------------- */ 348 349 if($('#contactform').length) { 350 351 var $form = $('#contactform'), 352 $loader = '<img src="images/ajax_loading.gif" alt="Loading..." />'; 353 $form.append('<div class="hidden-me" id="contact_form_responce">'); 354 355 var $response = $('#contact_form_responce'); 356 $response.append('<p></p>'); 357 358 $form.submit(function(e){ 359 360 $response.find('p').html($loader); 361 362 var data = { 363 action: "contact_form_request", 364 values: $("#contactform").serialize() 365 }; 366 367 //send data to server 368 $.post("inc/contact-send.php", data, function(response) { 369 370 response = $.parseJSON(response); 371 372 $(".incorrect-data").removeClass("incorrect-data"); 373 $response.find('img').remove(); 374 375 if(response.is_errors){ 376 377 $response.find('p').removeClass().addClass("error type-2"); 378 $.each(response.info,function(input_name, input_label) { 379 380 $("[name="+input_name+"]").addClass("incorrect-data"); 381 $response.find('p').append('Please enter correct "'+input_label+'"!'+ '</br>'); 382 }); 383 384 } else { 385 386 $response.find('p').removeClass().addClass('success type-2'); 387 388 if(response.info == 'success'){ 389 390 $response.find('p').append('Your email has been sent!');
391 $form.find('input:not(input[type="submit"], button), textarea, select').val('').attr( 'checked', false ); 392 $response.delay(1500).hide(400); 393 } 394 395 if(response.info == 'server_fail'){ 396 $response.find('p').append('Server failed. Send later!'); 397 } 398 } 399 400 // Scroll to bottom of the form to show respond message 401 var bottomPosition = $form.offset().top + $form.outerHeight() - $(window).height(); 402 403 if($(document).scrollTop() < bottomPosition) { 404 $('html, body').animate({ 405 scrollTop : bottomPosition 406 }); 407 } 408 409 if(!$('#contact_form_responce').css('display') == 'block') { 410 $response.show(450); 411 } 412 413 }); 414 415 e.preventDefault(); 416 417 }); 418 419 } 420 421 /* ---------------------------------------------------------------------- */ 422 /* Google Map Script 423 /* ---------------------------------------------------------------------- */ 424 if($('#map-canvas').length){ 425 google.maps.event.addDomListener(window, 'load', initialize); 426 } 427 428 /* ---------------------------------------------------------------------- */ 429 /* Filterable Script 430 /* ---------------------------------------------------------------------- */ 431 if($("#filterable-item-holder-1").length){ 432 jQuery(window).load(function($) { 433 var filter_container = jQuery('#filterable-item-holder-1'); 434 435 filter_container.children().css('position','relative'); 436 filter_container.masonry({ 437 singleMode: true, 438 itemSelector: '.filterable-item:not(.hide)', 439 animate: true, 440 animationOptions:{ duration: 800, queue: false } 441 }); 442 jQuery(window).resize(function(){ 443 var temp_width = filter_container.children().filter(':first').width()+30; 444 filter_container.masonry({ 445 columnWidth: temp_width, 446 singleMode: true, 447 itemSelector: '.filterable-item:not(.hide)', 448 animate: true, 449 animationOptions:{ duration: 800, queue: false } 450 }); 451 }); 452 jQuery('ul#filterable-item-filter-1 a').on('click',function(e){ 453 454 jQuery(this).addClass("active"); 455 jQuery(this).parents("li").siblings().children("a").removeClass("active"); 456 e.preventDefault(); 457 458 var select_filter = jQuery(this).attr('data-value'); 459 460 if( select_filter == "All" || jQuery(this).parent().index() == 0 ){ 461 filter_container.children().each(function(){ 462 if( jQuery(this).hasClass('hide') ){ 463 jQuery(this).removeClass('hide'); 464 jQuery(this).fadeIn(); 465 } 466 }); 467 }else{ 468 filter_container.children().not('.' + select_filter).each(function(){ 469 if( !jQuery(this).hasClass('hide') ){ 470 jQuery(this).addClass('hide'); 471 jQuery(this).fadeOut(); 472 } 473 }); 474 filter_container.children('.' + select_filter).each(function(){ 475 if( jQuery(this).hasClass('hide') ){ 476 jQuery(this).removeClass('hide'); 477 jQuery(this).fadeIn(); 478 } 479 }); 480 } 481 482 filter_container.masonry(); 483 484 }); 485 }); 486 } 487 488}); 489 490/* ---------------------------------------------------------------------- */ 491/* Google Map Function for Custom Style 492/* ---------------------------------------------------------------------- */ 493function initialize() { 494 "use strict"; 495 var MY_MAPTYPE_ID = 'custom_style'; 496 var map; 497 var brooklyn = new google.maps.LatLng(31.4830844, 74.3068658); 498 var featureOpts = [ 499 {"featureType":"landscape.man_made","elementType":"geometry","stylers":[{"color":"#f7f1df"}]},{"featureType":"landscape.natural","elementType":"geometry","stylers":[{"color":"#d0e3b4"}]},{"featureType":"landscape.natural.terrain","elementType":"geometry","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi.business","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.medical","elementType":"geometry","stylers":[{"color":"#fbd3da"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#bde6ab"}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#ffe15f"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#efd151"}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"road.local","elementType":"geometry.fill","stylers":[{"color":"black"}]},{"featureType":"transit.station.airport","elementType":"geometry.fill","stylers":[{"color":"#cfb2db"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#a2daf2"}]} 500 501 ]; 502 var mapOptions = { 503 zoom: 12, 504 center: brooklyn, 505 mapTypeControlOptions: { 506 mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID] 507 }, 508 mapTypeId: MY_MAPTYPE_ID 509 }; 510 511 map = new google.maps.Map( 512 document.getElementById('map-canvas'),
513 mapOptions 514 ); 515 516 var styledMapOptions = { 517 name: 'Custom Style' 518 }; 519 520 var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions); 521 522 map.mapTypes.set(MY_MAPTYPE_ID, customMapType); 523} 524 525 526/* ---------------------------------------------------------------------- */ 527/* Bookblock Script 528/* ---------------------------------------------------------------------- */ 529var Page = (function() { 530 531 var config = { 532 $bookBlock : $( '#bb-bookblock' ), 533 $navNext : $( '#bb-nav-next' ), 534 $navPrev : $( '#bb-nav-prev' ), 535 $navFirst : $( '#bb-nav-first' ), 536 $navLast : $( '#bb-nav-last' ) 537 }, 538 init = function() { 539 config.$bookBlock.bookblock( { 540 speed : 1000, 541 shadowSides : 0.8, 542 shadowFlip : 0.4 543 } ); 544 initEvents(); 545 }, 546 initEvents = function() { 547 548 var $slides = config.$bookBlock.children(); 549 550 // add navigation events 551 config.$navNext.on( 'click touchstart', function() { 552 config.$bookBlock.bookblock( 'next' ); 553 return false; 554 } ); 555 556 config.$navPrev.on( 'click touchstart', function() { 557 config.$bookBlock.bookblock( 'prev' ); 558 return false; 559 } ); 560 561 config.$navFirst.on( 'click touchstart', function() { 562 config.$bookBlock.bookblock( 'first' ); 563 return false; 564 } ); 565 566 config.$navLast.on( 'click touchstart', function() { 567 config.$bookBlock.bookblock( 'last' ); 568 return false; 569 } ); 570 571 // add swipe events 572 $slides.on( { 573 'swipeleft' : function( event ) { 574 config.$bookBlock.bookblock( 'next' ); 575 return false; 576 }, 577 'swiperight' : function( event ) { 578 config.$bookBlock.bookblock( 'prev' ); 579 return false; 580 } 581 } ); 582 583 // add keyboard events 584 $( document ).keydown( function(e) { 585 var keyCode = e.keyCode || e.which, 586 arrow = { 587 left : 37, 588 up : 38, 589 right : 39, 590 down : 40 591 }; 592 593 switch (keyCode) { 594 case arrow.left: 595 config.$bookBlock.bookblock( 'prev' ); 596 break; 597 case arrow.right: 598 config.$bookBlock.bookblock( 'next' ); 599 break; 600 } 601 } ); 602 }; 603 604 return { init : init }; 605 606})(); 607/* ---------------------------------------------------------------------- */ 608/* Bookblock Script 609/* ---------------------------------------------------------------------- */ 610if($( '#bb-bookblock' ).length){ 611 Page.init(); 612} 613<!--Bookmark Page--> 614 var triggerBookmark = $("#bookmark"); // It must be an `a` tag 615 616 triggerBookmark.click(function() { 617 618 if (window.sidebar && window.sidebar.addPanel) { // Firefox <23 619 620 window.sidebar.addPanel(document.title,window.location.href,''); 621 622 } else if(window.external && ('AddFavorite' in window.external)) { // Internet Explorer 623 624 window.external.AddFavorite(location.href,document.title); 625 626 } else if(window.opera && window.print || window.sidebar && ! (window.sidebar instanceof Node)) { // Opera <15 and Firefox >23 627 /** 628 * For Firefox <23 and Opera <15, no need for JS to add to bookmarks 629 * The only thing needed is a `title` and a `rel="sidebar"` 630 */ 631 triggerBookmark.attr('rel', 'sidebar').attr('title', document.title); 632 return true; 633 634 } else { // For the other browsers (mainly WebKit) we use a simple alert to inform users that they can add to bookmarks with ctrl+D/cmd+D 635 636 alert('You can add this page to your bookmarks by pressing ' + (navigator.userAgent.toLowerCase().indexOf('mac') != - 1 ? 'Command/Cmd' : 'CTRL') + ' + D on your keyboard.'); 637 638 } 639 // If you have something in the `href` of your trigger 640 return false; 641 }); 642<!--Display Sponsor Info--> 643function sponsorinfo() { 644 var x = document.getElementById("display"); 645 if (x.style.display === "none") { 646 x.style.display = "block"; 647 } else { 648 x.style.display = "none"; 649 } 650} 651<!--Display Breif content--> 652function breif_content() { 653 var x = document.getElementById("breif_content"); 654 if (x.style.display === "none") { 655 x.style.display = "block"; 656 } else { 657 x.style.display = "none"; 658 } 659} 660<!--Display Sharer--> 661function sharer() { 662 var x = document.getElementById("display"); 663 if (x.style.display === "none") { 664 x.style.display = "block"; 665 } else { 666 x.style.display = "none"; 667 } 668}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.